home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / ng / ngperl10 / src / language.dat < prev    next >
Encoding:
Text File  |  1993-02-27  |  77.2 KB  |  2,550 lines

  1. eat
  2.     Color := RandColor;
  3.     SetColor(Color);
  4.     SetFillStyle(Random(CloseDotFill)+1, Color);
  5.     Bar3D(Random(MaxWidth), Random(MaxHeight),
  6.           Random(MaxWidth), Random(MaxHeight), 0, TopOff);
  7.   until KeyPressed;
  8.   WaitToGo;
  9. end; { RandBarPlay }
  10.  
  11. procedure ArcPlay;
  12. { Draw random arcs on the screen }
  13. var
  14.   MaxRadius : word;
  15.   EndAngle : word;
  16.   ArcInfo : ArcCoordsType;
  17. begin
  18.   MainWindow('Arc / GetArcCoords demonstration');
  19.   StatusLine('Esc aborts or press a key');
  20.   MaxRadius := MaxY div 10;
  21.   repeat
  22.     SetColor(RandColor);
  23.     EndAngle := Random(360);
  24.     SetLineStyle(SolidLn, 0, NormWidth);
  25.     Arc(Random(MaxX), Random(MaxY), Random(EndAngle), EndAngle, Random(MaxRadius));
  26.     GetArcCoords(ArcInfo);
  27.     with ArcInfo do
  28.     begin
  29.       Line(X, Y, XStart, YStart);
  30.       Line(X, Y, Xend, Yend);
  31.     end;
  32.   until KeyPressed;
  33.   WaitToGo;
  34. end; { ArcPlay }
  35.  
  36. procedure PutPixelPlay;
  37. { Demonstrate the PutPixel and GetPixel commands }
  38. const
  39.   Seed   = 1962; { A seed for the random number generator }
  40.   NumPts = 2000; { The number of pixels plotted }
  41.   Esc    = #27;
  42. var
  43.   I : word;
  44.   X, Y, Color : word;
  45.   XMax, YMax  : integer;
  46.   ViewInfo    : ViewPortType;
  47. begin
  48.   MainWindow('PutPixel / GetPixel demonstration');
  49.   StatusLine('Esc aborts or press a key...');
  50.  
  51.   GetViewSettings(ViewInfo);
  52.   with ViewInfo do
  53.   begin
  54.     XMax := (x2-x1-1);
  55.     YMax := (y2-y1-1);
  56.   end;
  57.  
  58.   while not KeyPressed do
  59.   begin
  60.     { Plot random pixels }
  61.     RandSeed := Seed;
  62.     I := 0;
  63.     while (not KeyPressed) and (I < NumPts) do
  64.     begin
  65.       Inc(I);
  66.         PutPixel(Random(XMax)+1, Random(YMax)+1, RandColor);
  67.     end;
  68.  
  69.     { Erase pixels }
  70.     RandSeed := Seed;
  71.     I := 0;
  72.     while (not KeyPressed) and (I < NumPts) do
  73.     begin
  74.       Inc(I);
  75.       X := Random(XMax)+1;
  76.       Y := Random(YMax)+1;
  77.       Color := GetPixel(X, Y);
  78.         if Color = RandColor then
  79.           PutPixel(X, Y, 0);
  80.      end;
  81.   end;
  82.   WaitToGo;
  83. end; { PutPixelPlay }
  84.  
  85. procedure PutImagePlay;
  86. { Demonstrate the GetImage and PutImage commands }
  87.  
  88. const
  89.   r  = 20;
  90.   StartX = 100;
  91.   StartY = 50;
  92.  
  93. var
  94.   CurPort : ViewPortType;
  95.  
  96. procedure MoveSaucer(var X, Y : integer; Width, Height : integer);
  97. var
  98.   Step : integer;
  99. begin
  100.   Step := Random(2*r);
  101.   if Odd(Step) then
  102.     Step := -Step;
  103.   X := X + Step;
  104.   Step := Random(r);
  105.   if Odd(Step) then
  106.     Step := -Step;
  107.   Y := Y + Step;
  108.  
  109.   { Make saucer bounce off viewport walls }
  110.   with CurPort do
  111.   begin
  112.     if (x1 + X + Width - 1 > x2) then
  113.       X := x2-x1 - Width + 1
  114.     else
  115.       if (X < 0) then
  116.         X := 0;
  117.     if (y1 + Y + Height - 1 > y2) then
  118.       Y := y2-y1 - Height + 1
  119.     else
  120.       if (Y < 0) then
  121.         Y := 0;
  122.   end;
  123. end; { MoveSaucer }
  124.  
  125. var
  126.   Pausetime : word;
  127.   Saucer    : pointer;
  128.   X, Y      : integer;
  129.   ulx, uly  : word;
  130.   lrx, lry  : word;
  131.   Size      : word;
  132.   I         : word;
  133. begin
  134.   ClearDevice;
  135.   FullPort;
  136.  
  137.   { PaintScreen }
  138.   ClearDevice;
  139.   MainWindow('GetImage / PutImage Demonstration');
  140.   StatusLine('Esc aborts or press a key...');
  141.   GetViewSettings(CurPort);
  142.  
  143.   { DrawSaucer }
  144.   Ellipse(StartX, StartY, 0, 360, r, (r div 3)+2);
  145.   Ellipse(StartX, StartY-4, 190, 357, r, r div 3);
  146.   Line(StartX+7, StartY-6, StartX+10, StartY-12);
  147.   Circle(StartX+10, StartY-12, 2);
  148.   Line(StartX-7, StartY-6, StartX-10, StartY-12);
  149.   Circle(StartX-10, StartY-12, 2);
  150.   SetFillStyle(SolidFill, MaxColor);
  151.   FloodFill(StartX+1, StartY+4, GetColor);
  152.  
  153.   { ReadSaucerImage }
  154.   ulx := StartX-(r+1);
  155.   uly := StartY-14;
  156.   lrx := StartX+(r+1);
  157.   lry := StartY+(r div 3)+3;
  158.  
  159.   Size := ImageSize(ulx, uly, lrx, lry);
  160.   GetMem(Saucer, Size);
  161.   GetImage(ulx, uly, lrx, lry, Saucer^);
  162. {  PutImage(ulx, uly, Saucer^, XORput);               { erase image }
  163.  
  164.   { Plot some "stars" }
  165.   for I := 1 to 1000 do
  166.      PutPixel(Random(MaxX), Random(MaxY), RandColor);
  167.   X := MaxX div 2;
  168.   Y := MaxY div 2;
  169.   PauseTime := 70;
  170.  
  171.   { Move the saucer around }
  172.   repeat
  173. {     PutImage(X, Y, Saucer^, XORput);                 { draw image }
  174.      Delay(PauseTime);
  175. {     PutImage(X, Y, Saucer^, XORput);                 { erase image }
  176.      MoveSaucer(X, Y, lrx - ulx + 1, lry - uly + 1);  { width/height }
  177.   until KeyPressed;
  178.   FreeMem(Saucer, size);
  179.   WaitToGo;
  180. end; { PutImagePlay }
  181.  
  182. procedure PolyPlay;
  183. { Draw random polygons with random fill styles on the screen }
  184. const
  185.   MaxPts = 5;
  186. type
  187.   PolygonType = array[1..MaxPts] of PointType;
  188. var
  189.   Poly : PolygonType;
  190.   I, Color : word;
  191. begin
  192.   MainWindow('FillPoly demonstration');
  193.   StatusLine('Esc aborts or press a key...');
  194.   repeat
  195.     Color := RandColor;
  196.     SetFillStyle(Random(11)+1, Color);
  197.     SetColor(Color);
  198.     for I := 1 to MaxPts do
  199.       with Poly[I] do
  200.       begin
  201.         X := Random(MaxX);
  202.         Y := Random(MaxY);
  203.       end;
  204.     FillPoly(MaxPts, Poly);
  205.   until KeyPressed;
  206.   WaitToGo;
  207. end; { PolyPlay }
  208.  
  209. procedure FillStylePlay;
  210. { Display all of the predefined fill styles available }
  211. var
  212.   Style    : word;
  213.   Width    : word;
  214.   Height   : word;
  215.   X, Y     : word;
  216.   I, J     : word;
  217.   ViewInfo : ViewPortType;
  218.  
  219. procedure DrawBox(X, Y : word);
  220. begin
  221.   SetFillStyle(Style, MaxColor);
  222.   with ViewInfo do
  223.     Bar(X, Y, X+Width, Y+Height);
  224.   Rectangle(X, Y, X+Width, Y+Height);
  225.   OutTextXY(X+(Width div 2), Y+Height+4, Int2Str(Style));
  226.   Inc(Style);
  227. end; { DrawBox }
  228.  
  229. begin
  230.   MainWindow('Pre-defined fill styles');
  231.   GetViewSettings(ViewInfo);
  232.   with ViewInfo do
  233.   begin
  234.     Width := 2 * ((x2+1) div 13);
  235.     Height := 2 * ((y2-10) div 10);
  236.   end;
  237.   X := Width div 2;
  238.   Y := Height div 2;
  239.   Style := 0;
  240.   for J := 1 to 3 do
  241.   begin
  242.     for I := 1 to 4 do
  243.     begin
  244.       DrawBox(X, Y);
  245.       Inc(X, (Width div 2) * 3);
  246.     end;
  247.     X := Width div 2;
  248.     Inc(Y, (Height div 2) * 3);
  249.   end;
  250.   SetTextJustify(LeftText, TopText);
  251.   WaitToGo;
  252. end; { FillStylePlay }
  253.  
  254. procedure FillPatternPlay;
  255. { Display some user defined fill patterns }
  256. const
  257.   Patterns : array[0..11] of FillPatternType = (
  258.   ($AA, $55, $AA, $55, $AA, $55, $AA, $55 üÖü üÖü  !BBäx!!!BBäx!BBäx"""DDêp""DDêp>"""BBääêp""!"BDäêêp>IÉÆ|      ° @≥î>00>><Dêx  !BBäx""DDêp&<"DDêê&22TTêêê$> $< @äêp>          ⁿBBBB<  @@Ç****DDDDDDDU¬U¬U¬U¬U¬U¬U¬▌w▌w▌w▌w▌w▌w▌w°°°≥■°°≥≥■≥≥■■°°°    ≤  ≤  ≤≤         °                     ≡≡≡≡≡≡≡≡≡≡≡≡≡≡       ;DDD;    $"Bdÿ>@@@>||>Ac]AAA1N"A""2,  `1NA"*III*<Bü üB<<BüüüB<A" \"QIE" < <BBBB  @@    ~ ?  @ÇB$$B ""A$$"AII6 üBr»$**IIII**ccregion.  The region is defined as any pixel of
  259.             OldColor which has a path of pixels of OldColor or NewColor
  260.             with sides touching back to the seed point, (XSeed, YSeed).
  261.             Therefore, only pixels of OldColor are modified and no other
  262.             information is changed.
  263.  
  264.             SEE ALSO
  265.  
  266.             DRWFILLBOX, DRWFILLCIRCLE, DRWFILLELLIPSE, FILLAREA,
  267.             FILLCONVEXPOLY, FILLPAGE, FILLPOLY, FILLSCREEN, FILLVIEW,
  268.             SETVIEW
  269.  
  270.             EXAMPL(HNxHHO$B<BBBB<$<BBBB<<BBBB<$BBBBBF:0BBBBF:$BBBF:B<""AAA""AAAAA"<B@@B<" <2\A">>xDDxDNDD <` <>BB= > <BBBB< BBBBF:2L\bBBBB&AaQIECA8$>""">0@@A>@@@ b$(. b$(*
  271.     $    $    $DDDDDDD¬U¬U¬U¬U¬U¬U¬Uw▌w▌w▌w▌w▌w▌w▌°°°⌠ⁿ°°⌠⌠ⁿ⌠⌠ⁿⁿ°°°    ≈  ≈  ≈≈         °                     ≡≡≡≡≡≡≡≡≡≡≡≡≡≡       7HH7"B\DBBRL~BB@@@@@@?R~!!~?DDDD8BBBB|@@Ç>P>III>"AA""AAA"Uw<DDDD86II6"EIQ"\ @@ "AAAAA> >     hH02L2L$$<H(,$<>>>>>>>         VMODE=VIDEOMODEGET
  272.             IF WHICHVGA = 0 THEN STOP
  273.             DUMMY=RES640
  274.             SETVIEW 100, 100, 539, 379
  275.             FILLVIEW 10
  276.             WHILE INKEY$ = ""
  277.             WEND
  278.             VIDEOMODESET VMODE
  279.             END
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.                                                                          63
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.           FONTGETINFO
  304.  
  305.             PROTOTYPE
  306.  
  307.             SUB FONTGETINFO (Width%, Height%)
  308.  
  309.             INPUT
  310.  
  311.             no input parameters
  312.     WEND
  313.             MOUSEEXIT
  314.             VIDEOMODESET VMODE
  315.             END
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.                                                                          86
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.           MOUSECURSORDEFAULT
  364.  
  365.             PROTOTYPE
  366.  
  367.             SUB MOUSECURSORDEFAULT ()
  368.  
  369.             INPUT
  370.  
  371.             no input parameters
  372.  
  373.             OUTPUT
  374.  
  375.             no value returned
  376.  
  377.             USAGE
  378.  
  379.             MOUSECURSORDEFAULT defines the mouse cursor to be a small
  380.        ,K$╖┼╘╤░XQ)σ┤ö≡÷┴─┤àñT┘,╘¬àñX9╘⌠àñ\9╘UÜ╢≤`9╘4a╘d9╘UTa╘h9╘ta╘l9╘Uöa╘p9╘┤a╘t┘PT±x┴îÇ╖0▓ïα│ÅαU┤ôα╡ùα╢¢α╖úΓ╘pǺΓ╕¡αë ╚┴πì°sKÉφb<$⌡▌ë     φë φë I1φë  Eφë $YφÆë (mφë ,üφë 0$òφë á⌐φë ñ╜φë I¿╤φë ¼σφë ░∙φÆë 4
  381. ²ë ┤!²ë ╕$5²ë ╝I²ë └]²ë ⌐8q²ë <àⁿΦiǬ∙PÖÇ ¥Ç
  382. ░╨â@%8@ΓΦá╝╤░≡cÑÅ*$
  383. ░╕≡ż≡τ╥m¿⌡ε    ╨@#µ≈$âh$âαra╨à`¥è∩Ç%Ç +─▀ TîcOî∩â°1<@  [$¿Ç¼ MMl·0ƒ Y¼─!%6a▐è ¥ì ßá+?±  P<îaTTV ╪iÇ¡≥░ `_ñ»%Çá᪠P█º»ε`éa∙É%H«┴íA%Gár∙É
  384. iw∙Éiφ`╧≥≡╤Çmⁿ▒
  385. ]ÆAáσw7░⌡∩    $·╟Ç√É&^`  ┐ $ⁿ  $■ $╒ nk$J-ÉQ1£PéBù »0αQ/Ñ4╜£░ºP≈Ñ4Ç⌡$(ª▀$@C]Æé≈└╕_SÇçÑ4=iÉ⌠ä╣<_np@Ñ45ò▒Y3ü¼Qí░.i>╠@5+┴╙É╛╙$@ #┴@«╦
  386. $╤
  387. #@Ñú4,p&e÷ü¼_ÇQºÑ4
  388. òQ  ü@;¡_áQ@e╠≥@mp!┤a╘O░√`Pñź ÇT°8ÿ!¼Åñ$½╙"q¿ PñCÇ¿α√└╥░eT"ß<p°%Pæ(╧%pδ¥/OêW0Ǽbφ φ B@[â¼8â≥µ≤(    ¿⌡%(Ç∩áTÿp+ óÜ▓0!Σ±(1±
  389. ░┤ÖÇD└D0Å╡`   $ «îO@╧1
  390. a╝╤j-0ñ│`@╖bΦaT1═⌠╝╤Σ²¼±,1öíî9lÿ28ÇÅ`Γî¿P²$,N0┴O0a╫δ≤0σú`°î╖#0δ≡└X▄1»Σî(▒¥Ç█Ñ"qá√1CÇú╟╨º Å
  391. FT Θ²î└1ÇY0    w ²à░$@AÅ`╦Φ¼╘`▄1A  }┐Ç*5 ΩSδδî`¼îaδæ¼î5 1¿⌡Ω╜⌠ ¼¥╬ü└Qî1S
  392. ╛≤î9╨iÇ,∙PU(}Ç$üÇ àÇ`σìÇ`QαÜBO$%ÿÇ╧"$Ç«Ç]É.┬\`%WÉ$  W0 ÄâO0]αG┬ur╩
  393. ░£▒
  394. Q¢ú╔Ç≡°s?`X0╘`@ µWâ@╣aá εdq`¥9?Ç&+o0µyÄΣAÅuV(7P╬±@IdQ╕@Å┤@;Ç▓?Çò│CÇ┤╟╨╡KÇÄ30ⁿφ° ó╬ì+]Ä╦≡     Mö╝σ ²y5<!└▀óâ╝É3~mp    $<╛≤9Æ-2ⁿ≡@T,╞Σa,)Pæ└¥#¼╪Q┤S(¼@Aîa
  395. ≡╤@Ö²±⌠KëD─┴▒▀0╨Ñ$╩-0 ╨ê*╙▓edm`î=3Kß-10è=≥≤²└£mîjy ÿe²ⁿ╨i╕e▓ΣmαÖ╢C%Ç*ê*0 EátQZ`mÄLP%    °üⁿªüNQ∙  T¿<qtWΩc z░ÅÇñΩçǪçÇ«;└<┐á¼¥. á?<Σscî)áí := 0;
  396.       end;
  397.     end;
  398.   end;
  399.   WaitToGo;
  400. end; { UserLineStylePlay }
  401.  
  402.  
  403. procedure SayGoodbye;
  404. { Say goodbye and then exit the program }
  405. var
  406.   ViewInfo : ViewPortType;
  407. begin
  408.   MainWindow('');
  409.   GetViewSettings(ViewInfo);
  410.   SetTextStyle(TriplexFont, HorizDir, 4);
  411.   SetTextJustify(CenterText, CenterText);
  412.   with ViewInfo do
  413.     OutTextXY((x2-x1) div 2, (y2-y1) div 2, 'That''s all folks!');
  414.   StatusLine('Press any key to quit...');
  415.   repeat until KeyPressed;
  416. end; { SayGoodbye }
  417.  
  418.  
  419. PROCEDURE SelectMode;
  420. VAR
  421.     choice1,choice2     : CHAR;
  422.    xsize,ysize            : WORD;
  423. BEGIN
  424.     (* Let's select a mode *)
  425.     ClrScr;
  426.     WriteLn('VESADEMO:');
  427.     WriteLn('1. 256 colors');
  428.     WriteLn('2. 32768 colors');
  429.     WriteLn('3. 65536 colors');
  430.     WriteLn('4. 16777216 colors');
  431.     WriteLn('Q uit');
  432.     WriteLn;
  433.     Write('Your choice: ');
  434.     REPEAT
  435.         ReadLn(choice1);
  436.       IF choice1 <> '1' THEN BEGIN
  437.           WriteLn('Sorry !');
  438.          WriteLn('This demo wasn''t written for more as 256 colors !');
  439.          WriteLn('You would only get a limited impression of the Hi-& TrueColor modes...');
  440.          WriteLn('Switching to 256 colors.');
  441.          choice1 := '1';
  442.       END;
  443.     UNTIL choice1 IN ['1'..'4','q'];
  444.     IF choice1 = 'q' THEN Halt;
  445.  
  446.     WriteLn;
  447.     WriteLn;
  448.     WriteLn('a. 320x200');
  449.     WriteLn('b. 640x480');
  450.     WriteLn('c. 800x600');
  451.     WriteLn('d. 1024x768');
  452.     WriteLn('e. 1280x1024');
  453.     WriteLn('Q uit');
  454.     WriteLn;
  455.     Write('Your choice: ');
  456.     REPEAT
  457.         ReadLn(choice2);
  458.     UNTIL choice2 IN ['a'..'e','q'];
  459.     IF choice2 = 'q' THEN Halt;
  460.  
  461.     CASE choice2 OF
  462.         'a' : BEGIN
  463.             xsize := 320;
  464.             ysize := 200;
  465.         END;
  466.         'b' : BEGIN
  467.             xsize := 640;
  468.             ysize := 480;
  469.         END;
  470.         'c' : BEGIN
  471.             xsize := 800;
  472.             ysize := 600;
  473.         END;
  474.         'd' : BEGIN
  475.             xsize := 1024;
  476.             ysize := 768;
  477.         END;
  478.         'e' : BEGIN
  479.             xsize := 1280;
  480.             ysize := 1024;
  481.         END;
  482.     END;
  483.     CASE choice1 OF
  484.         '1' : mode := FindVesaMode(xsize,ysize,8);
  485.         '2' : mode := FindVesaMode(xsize,ysize,15);
  486.         '3' : mode := FindVesaMode(xsize,ysize,16);
  487.         '4' : mode := FindVesaMode(xsize,ysize,24);
  488.     END;
  489.     IF mode = 0 THEN BEGIN
  490.         WriteLn('No such mode could be found !');
  491.         WriteLn('Switching to to 320x200.');
  492.         ReadKey;
  493.         mode := V320x200x256;
  494.     END;
  495. END;
  496.  
  497. begin { program body }
  498.   SelectMode;
  499.   Initialize;
  500.   ReportStatus;
  501.  
  502. {  AspectRatioPlay; }
  503.   FillEllipsePlay;
  504.   SectorPlay;
  505.   WriteModePlay;
  506.  
  507.   ColorPlay;
  508.   { PalettePlay only intended to work on these drivers: }
  509.   if (GraphDriver = EGA) or
  510.       (GraphDriver = EGA64) or
  511.       (GraphDriver = VGA) then
  512.      PalettePlay;
  513.   PutPixelPlay;
  514. {  PutImagePlay; }
  515.   RandBarPlay;
  516.   BarPlay;
  517.   Bar3DPlay;
  518.   ArcPlay;
  519.   CirclePlay;
  520.   PiePlay;
  521.   LineToPlay;
  522.   LineRelPlay;
  523. {  LineStylePlay; }
  524. {  UserLineStylePlay; }
  525.   TextDump;
  526.   TextPlay;
  527.   CrtModePlay;
  528.   FillStylePlay;
  529.   FillPatternPlay;
  530.   PolyPlay;
  531.   SayGoodbye;
  532. {  CloseGraph; }
  533.   CloseVesa;
  534. end.
  535. ***************************************************
  536.     '* SHOW D2ROTATE (ABOUT THE ORIGIN)
  537.     '****************************************************************∞╥≤c≤*φè#^│v/╒:j═φ0t+l▓ô"¬"g└≡?%ªêΣ│H╫½╫╜├¿U'╒⌐⌡ ßV?╩
  538. ¬ujOΦçEZ1∞▐! ▄B╛Σ8║æ]1GlNÜ┐q▌▓;ô$ΦzE<cª*bEô#ä╧ñÅ"∩─LrdaÖ ╠º╫a^¥£å╬1~)@ëÖMδ╫0═6DäFê¬Çv┼ß╨kæpτ╪É)}ª 1w3╤╧ü⌡¥╓h▓╣≈ïÅaÑ[TⁿHqªÉ╝DKÄ─Y-∞tT╤Θ╨º╟╪.*ÇI9lΦ≈{πτcσ$τπßoFr╪╨∩┼╞╟;O2■e²LÜ4^N|╪½ÅO?╔°FOz`╟╟╟'<>>π$πΘù6·
  539. Xgî╖│°oîδπGƒd╝▀░?■╪╔_9L ⌡ôⁿq'æO▀ƒn4╔▀╚▄┼3pτ.òO°·}÷╕ⁿ±'æO?ít│!√8ßÑ≤/┐╣p┼≥┘E╦Vox╕cΦé5╟╚º╙$?√$≥ΘZεsî≡åìΓpKù¢ïß X╥ 9╞≈\µk┤O¥_ 5Üö\≤éÄ┌╤A[╤ÿáï┼éNⁿÅu16    g,%hc╙╨cD╨Vï┘R¢öKñR;8εáΣ╢╪ós╤π╡á└èxgzPÄMú╫yαºÉ+σJ¢i+▓â3╥    ═Ñ╙î^ºG▓█πérφçs %#(╗⌠?┼%u8≡6+QÉ))ò)Afw≈╣╪)B&4░åLXV:δät@Å.;5Φf╢Ät┐ΣJ╫─U8úÇ╟éö£╕p╔┴⌠vg╨╬╥é÷╪╣┬ΓI.ç≡^v╤ZΦÇ& ╒┌6ñô6XßNè╡╬E₧Ñ
  540. kIº╠▄A+╣╥éb²tæ-Y¡½αÑa═uuîÇ╢αêvhuª╡SÅ┤vèùú¥F;p<d⌐/F─d█éT%▓KΦû=q■öI┐ ┐╠6S$▒÷╚ENΩ¥Fû9╔┌R'╝ ╧φ└?g┬j▓0═/b╖₧─mûé╢┌»ÿÄë/·<éò■░╤╟╢├Xσ:╥P3Θ"╬Læsφ░┌öSö!╗¿*mN£WΣÇ£┤~#╗ææ≥RΩóh:à▌.æ≈╕▌v£äàd▒à╒├=░╖π║$howeg*╬    6ù▄ƒô╕φ░Ö╢qΘD>(w@úKεHÆ╛öúΣU
  541. éÜR╔╤W▄èê 2M%ó.▓SNÖA1ùJE╢║l]▓¿>\%└Å4ßO▄£â⌐& ê/)8vSP▀▓ôⁿææ√ü√ÑÄa⌠â╚4S╓╟P- ?Σá╕▓Næ*q╡UΘ▓≈^ñ·I.rúR&$Y^╚%è≡B┌≈Ceat
  542.     Color := RandColor;
  543.     SetColor(Color);
  544.     SetFillStyle(Random(CloseDotFill)+1, Color);
  545.     Bar3D(Random(MaxWidth), Random(MaxHeight),
  546.           Random(MaxWidth), Random(MaxHeight), 0, TopOff);
  547.   until KeyPressed;
  548.   WaitToGo;
  549. end; { RandBarPlay }
  550.  
  551. procedure ArcPlay;
  552. { Draw random arcs on the screen }
  553. var
  554.   MaxRadius : word;
  555.   EndAngle : word;
  556.   ArcInfo : ArcCoordsType;
  557. begin
  558.   MainWindow('Arc / GetArcCoords demonstration');
  559.   StatusLine('Esc aborts or press a key');
  560.   MaxRadius := MaxY div 10;
  561.   repeat
  562.     SetColor(RandColor);
  563.     EndAngle := Random(360);
  564.     SetLineStyle(SolidLn, 0, NormWidth);
  565.     Arc(Random(MaxX), Random(MaxY), Random(EndAngle), EndAngle, Random(MaxRadius));
  566.     GetArcCoords(ArcInfo);
  567.     with ArcInfo do
  568.     begin
  569.       Line(X, Y, XStart, YStart);
  570.       Line(X, Y, Xend, Yend);
  571.     end;
  572.   until KeyPressed;
  573.   WaitToGo;
  574. end; { ArcPlay }
  575.  
  576. procedure PutPixelPlay;
  577. { Demonstrate the PutPixel and GetPixel commands }
  578. const
  579.   Seed   = 1962; { A seed for the random number generator }
  580.   NumPts = 2000; { The number of pixels plotted }
  581.   Esc    = #27;
  582. var
  583.   I : word;
  584.   X, Y, Color : word;
  585.   XMax, YMax  : integer;
  586.   ViewInfo    : ViewPortType;
  587. begin
  588.   MainWindow('PutPixel / GetPixel demonstration');
  589.   StatusLine('Esc aborts or press a key...');
  590.  
  591.   GetViewSettings(ViewInfo);
  592.   with ViewInfo do
  593.   begin
  594.     XMax := (x2-x1-1);
  595.     YMax := (y2-y1-1);
  596.   end;
  597.  
  598.   while not KeyPressed do
  599.   begin
  600.     { Plot random pixels }
  601.     RandSeed := Seed;
  602.     I := 0;
  603.     while (not KeyPressed) and (I < NumPts) do
  604.     begin
  605.       Inc(I);
  606.         PutPixel(Random(XMax)+1, Random(YMax)+1, RandColor);
  607.     end;
  608.  
  609.     { Erase pixels }
  610.     RandSeed := Seed;
  611.     I := 0;
  612.     while (not KeyPressed) and (I < NumPts) do
  613.     begin
  614.       Inc(I);
  615.       X := Random(XMax)+1;
  616.       Y := Random(YMax)+1;
  617.       Color := GetPixel(X, Y);
  618.         if Color = RandColor then
  619.           PutPixel(X, Y, 0);
  620.      end;
  621.   end;
  622.   WaitToGo;
  623. end; { PutPixelPlay }
  624.  
  625. procedure PutImagePlay;
  626. { Demonstrate the GetImage and PutImage commands }
  627.  
  628. const
  629.   r  = 20;
  630.   StartX = 100;
  631.   StartY = 50;
  632.  
  633. var
  634.   CurPort : ViewPortType;
  635.  
  636. procedure MoveSaucer(var X, Y : integer; Width, Height : integer);
  637. var
  638.   Step : integer;
  639. begin
  640.   Step := Random(2*r);
  641.   if Odd(Step) then
  642.     Step := -Step;
  643.   X := X + Step;
  644.   Step := Random(r);
  645.   if Odd(Step) then
  646.     Step := -Step;
  647.   Y := Y + Step;
  648.  
  649.   { Make saucer bounce off viewport walls }
  650.   with CurPort do
  651.   begin
  652.     if (x1 + X + Width - 1 > x2) then
  653.       X := x2-x1 - Width + 1
  654.     else
  655.       if (X < 0) then
  656.         X := 0;
  657.     if (y1 + Y + Height - 1 > y2) then
  658.       Y := y2-y1 - Height + 1
  659.     else
  660.       if (Y < 0) then
  661.         Y := 0;
  662.   end;
  663. end; { MoveSaucer }
  664.  
  665. var
  666.   Pausetime : word;
  667.   Saucer    : pointer;
  668.   X, Y      : integer;
  669.   ulx, uly  : word;
  670.   lrx, lry  : word;
  671.   Size      : word;
  672.   I         : word;
  673. begin
  674.   ClearDevice;
  675.   FullPort;
  676.  
  677.   { PaintScreen }
  678.   ClearDevice;
  679.   MainWindow('GetImage / PutImage Demonstration');
  680.   StatusLine('Esc aborts or press a key...');
  681.   GetViewSettings(CurPort);
  682.  
  683.   { DrawSaucer }
  684.   Ellipse(StartX, StartY, 0, 360, r, (r div 3)+2);
  685.   Ellipse(StartX, StartY-4, 190, 357, r, r div 3);
  686.   Line(StartX+7, StartY-6, StartX+10, StartY-12);
  687.   Circle(StartX+10, StartY-12, 2);
  688.   Line(StartX-7, StartY-6, StartX-10, StartY-12);
  689.   Circle(StartX-10, StartY-12, 2);
  690.   SetFillStyle(SolidFill, MaxColor);
  691.   FloodFill(StartX+1, StartY+4, GetColor);
  692.  
  693.   { ReadSaucerImage }
  694.   ulx := StartX-(r+1);
  695.   uly := StartY-14;
  696.   lrx := StartX+(r+1);
  697.   lry := StartY+(r div 3)+3;
  698.  
  699.   Size := ImageSize(ulx, uly, lrx, lry);
  700.   GetMem(Saucer, Size);
  701.   GetImage(ulx, uly, lrx, lry, Saucer^);
  702. {  PutImage(ulx, uly, Saucer^, XORput);               { erase image }
  703.  
  704.   { Plot some "stars" }
  705.   for I := 1 to 1000 do
  706.      PutPixel(Random(MaxX), Random(MaxY), RandColor);
  707.   X := MaxX div 2;
  708.   Y := MaxY div 2;
  709.   PauseTime := 70;
  710.  
  711.   { Move the saucer around }
  712.   repeat
  713. {     PutImage(X, Y, Saucer^, XORput);                 { draw image }
  714.      Delay(PauseTime);
  715. {     PutImage(X, Y, Saucer^, XORput);                 { erase image }
  716.      MoveSaucer(X, Y, lrx - ulx + 1, lry - uly + 1);  { width/height }
  717.   until KeyPressed;
  718.   FreeMem(Saucer, size);
  719.   WaitToGo;
  720. end; { PutImagePlay }
  721.  
  722. procedure PolyPlay;
  723. { Draw random polygons with random fill styles on the screen }
  724. const
  725.   MaxPts = 5;
  726. type
  727.   PolygonType = array[1..MaxPts] of PointType;
  728. var
  729.   Poly : PolygonType;
  730.   I, Color : word;
  731. begin
  732.   MainWindow('FillPoly demonstration');
  733.   StatusLine('Esc aborts or press a key...');
  734.   repeat
  735.     Color := RandColor;
  736.     SetFillStyle(Random(11)+1, Color);
  737.     SetColor(Color);
  738.     for I := 1 to MaxPts do
  739.       with Poly[I] do
  740.       begin
  741.         X := Random(MaxX);
  742.         Y := Random(MaxY);
  743.       end;
  744.     FillPoly(MaxPts, Poly);
  745.   until KeyPressed;
  746.   WaitToGo;
  747. end; { PolyPlay }
  748.  
  749. procedure FillStylePlay;
  750. { Display all of the predefined fill styles available }
  751. var
  752.   Style    : word;
  753.   Width    : word;
  754.   Height   : word;
  755.   X, Y     : word;
  756.   I, J     : word;
  757.   ViewInfo : ViewPortType;
  758.  
  759. procedure DrawBox(X, Y : word);
  760. begin
  761.   SetFillStyle(Style, MaxColor);
  762.   with ViewInfo do
  763.     Bar(X, Y, X+Width, Y+Height);
  764.   Rectangle(X, Y, X+Width, Y+Height);
  765.   OutTextXY(X+(Width div 2), Y+Height+4, Int2Str(Style));
  766.   Inc(Style);
  767. end; { DrawBox }
  768.  
  769. begin
  770.   MainWindow('Pre-defined fill styles');
  771.   GetViewSettings(ViewInfo);
  772.   with ViewInfo do
  773.   begin
  774.     Width := 2 * ((x2+1) div 13);
  775.     Height := 2 * ((y2-10) div 10);
  776.   end;
  777.   X := Width div 2;
  778.   Y := Height div 2;
  779.   Style := 0;
  780.   for J := 1 to 3 do
  781.   begin
  782.     for I := 1 to 4 do
  783.     begin
  784.       DrawBox(X, Y);
  785.       Inc(X, (Width div 2) * 3);
  786.     end;
  787.     X := Width div 2;
  788.     Inc(Y, (Height div 2) * 3);
  789.   end;
  790.   SetTextJustify(LeftText, TopText);
  791.   WaitToGo;
  792. end; { FillStylePlay }
  793.  
  794. procedure FillPatternPlay;
  795. { Display some user defined fill patterns }
  796. const
  797.   Patterns : array[0..11] of FillPatternType = (
  798.   ($AA, $55, $AA, $55, $AA, $55, $AA, $55 üÖü üÖü  !BBäx!!!BBäx!BBäx"""DDêp""DDêp>"""BBääêp""!"BDäêêp>IÉÆ|      ° @≥î>00>><Dêx  !BBäx""DDêp&<"DDêê&22TTêêê$> $< @äêp>          ⁿBBBB<  @@Ç****DDDDDDDU¬U¬U¬U¬U¬U¬U¬▌w▌w▌w▌w▌w▌w▌w°°°≥■°°≥≥■≥≥■■°°°    ≤  ≤  ≤≤         °                     ≡≡≡≡≡≡≡≡≡≡≡≡≡≡       ;DDD;    $"Bdÿ>@@@>||>Ac]AAA1N"A""2,  `1NA"*III*<Bü üB<<BüüüB<A" \"QIE" < <BBBB  @@    ~ ?  @ÇB$$B ""A$$"AII6 üBr»$**IIII**ccregion.  The region is defined as any pixel of
  799.             OldColor which has a path of pixels of OldColor or NewColor
  800.             with sides touching back to the seed point, (XSeed, YSeed).
  801.             Therefore, only pixels of OldColor are modified and no other
  802.             information is changed.
  803.  
  804.             SEE ALSO
  805.  
  806.             DRWFILLBOX, DRWFILLCIRCLE, DRWFILLELLIPSE, FILLAREA,
  807.             FILLCONVEXPOLY, FILLPAGE, FILLPOLY, FILLSCREEN, FILLVIEW,
  808.             SETVIEW
  809.  
  810.             EXAMPL(HNxHHO$B<BBBB<$<BBBB<<BBBB<$BBBBBF:0BBBBF:$BBBF:B<""AAA""AAAAA"<B@@B<" <2\A">>xDDxDNDD <` <>BB= > <BBBB< BBBBF:2L\bBBBB&AaQIECA8$>""">0@@A>@@@ b$(. b$(*
  811.     $    $    $DDDDDDD¬U¬U¬U¬U¬U¬U¬Uw▌w▌w▌w▌w▌w▌w▌°°°⌠ⁿ°°⌠⌠ⁿ⌠⌠ⁿⁿ°°°    ≈  ≈  ≈≈         °                     ≡≡≡≡≡≡≡≡≡≡≡≡≡≡       7HH7"B\DBBRL~BB@@@@@@?R~!!~?DDDD8BBBB|@@Ç>P>III>"AA""AAA"Uw<DDDD86II6"EIQ"\ @@ "AAAAA> >     hH02L2L$$<H(,$<>>>>>>>         VMODE=VIDEOMODEGET
  812.             IF WHICHVGA = 0 THEN STOP
  813.             DUMMY=RES640
  814.             SETVIEW 100, 100, 539, 379
  815.             FILLVIEW 10
  816.             WHILE INKEY$ = ""
  817.             WEND
  818.             VIDEOMODESET VMODE
  819.             END
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.                                                                          63
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.           FONTGETINFO
  844.  
  845.             PROTOTYPE
  846.  
  847.             SUB FONTGETINFO (Width%, Height%)
  848.  
  849.             INPUT
  850.  
  851.             no input parameters
  852.     WEND
  853.             MOUSEEXIT
  854.             VIDEOMODESET VMODE
  855.             END
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.                                                                          86
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.           MOUSECURSORDEFAULT
  904.  
  905.             PROTOTYPE
  906.  
  907.             SUB MOUSECURSORDEFAULT ()
  908.  
  909.             INPUT
  910.  
  911.             no input parameters
  912.  
  913.             OUTPUT
  914.  
  915.             no value returned
  916.  
  917.             USAGE
  918.  
  919.             MOUSECURSORDEFAULT defines the mouse cursor to be a small
  920.        ,K$╖┼╘╤░XQ)σ┤ö≡÷┴─┤àñT┘,╘¬àñX9╘⌠àñ\9╘UÜ╢≤`9╘4a╘d9╘UTa╘h9╘ta╘l9╘Uöa╘p9╘┤a╘t┘PT±x┴îÇ╖0▓ïα│ÅαU┤ôα╡ùα╢¢α╖úΓ╘pǺΓ╕¡αë ╚┴πì°sKÉφb<$⌡▌ë     φë φë I1φë  Eφë $YφÆë (mφë ,üφë 0$òφë á⌐φë ñ╜φë I¿╤φë ¼σφë ░∙φÆë 4
  921. ²ë ┤!²ë ╕$5²ë ╝I²ë └]²ë ⌐8q²ë <àⁿΦiǬ∙PÖÇ ¥Ç
  922. ░╨â@%8@ΓΦá╝╤░≡cÑÅ*$
  923. ░╕≡ż≡τ╥m¿⌡ε    ╨@#µ≈$âh$âαra╨à`¥è∩Ç%Ç +─▀ TîcOî∩â°1<@  [$¿Ç¼ MMl·0ƒ Y¼─!%6a▐è ¥ì ßá+?±  P<îaTTV ╪iÇ¡≥░ `_ñ»%Çá᪠P█º»ε`éa∙É%H«┴íA%Gár∙É
  924. iw∙Éiφ`╧≥≡╤Çmⁿ▒
  925. ]ÆAáσw7░⌡∩    $·╟Ç√É&^`  ┐ $ⁿ  $■ $╒ nk$J-ÉQ1£PéBù »0αQ/Ñ4╜£░ºP≈Ñ4Ç⌡$(ª▀$@C]Æé≈└╕_SÇçÑ4=iÉ⌠ä╣<_np@Ñ45ò▒Y3ü¼Qí░.i>╠@5+┴╙É╛╙$@ #┴@«╦
  926. $╤
  927. #@Ñú4,p&e÷ü¼_ÇQºÑ4
  928. òQ  ü@;¡_áQ@e╠≥@mp!┤a╘O░√`Pñź ÇT°8ÿ!¼Åñ$½╙"q¿ PñCÇ¿α√└╥░eT"ß<p°%Pæ(╧%pδ¥/OêW0Ǽbφ φ B@[â¼8â≥µ≤(    ¿⌡%(Ç∩áTÿp+ óÜ▓0!Σ±(1±
  929. ░┤ÖÇD└D0Å╡`   $ «îO@╧1
  930. a╝╤j-0ñ│`@╖bΦaT1═⌠╝╤Σ²¼±,1öíî9lÿ28ÇÅ`Γî¿P²$,N0┴O0a╫δ≤0σú`°î╖#0δ≡└X▄1»Σî(▒¥Ç█Ñ"qá√1CÇú╟╨º Å
  931. FT Θ²î└1ÇY0    w ²à░$@AÅ`╦Φ¼╘`▄1A  }┐Ç*5 ΩSδδî`¼îaδæ¼î5 1¿⌡Ω╜⌠ ¼¥╬ü└Qî1S
  932. ╛≤î9╨iÇ,∙PU(}Ç$üÇ àÇ`σìÇ`QαÜBO$%ÿÇ╧"$Ç«Ç]É.┬\`%WÉ$  W0 ÄâO0]αG┬ur╩
  933. ░£▒
  934. Q¢ú╔Ç≡°s?`X0╘`@ µWâ@╣aá εdq`¥9?Ç&+o0µyÄΣAÅuV(7P╬±@IdQ╕@Å┤@;Ç▓?Çò│CÇ┤╟╨╡KÇÄ30ⁿφ° ó╬ì+]Ä╦≡     Mö╝σ ²y5<!└▀óâ╝É3~mp    $<╛≤9Æ-2ⁿ≡@T,╞Σa,)Pæ└¥#¼╪Q┤S(¼@Aîa
  935. ≡╤@Ö²±⌠KëD─┴▒▀0╨Ñ$╩-0 ╨ê*╙▓edm`î=3Kß-10è=≥≤²└£mîjy ÿe²ⁿ╨i╕e▓ΣmαÖ╢C%Ç*ê*0 EátQZ`mÄLP%    °üⁿªüNQ∙  T¿<qtWΩc z░ÅÇñΩçǪçÇ«;└<┐á¼¥. á?<Σscî)áí := 0;
  936.       end;
  937.     end;
  938.   end;
  939.   WaitToGo;
  940. end; { UserLineStylePlay }
  941.  
  942.  
  943. procedure SayGoodbye;
  944. { Say goodbye and then exit the program }
  945. var
  946.   ViewInfo : ViewPortType;
  947. begin
  948.   MainWindow('');
  949.   GetViewSettings(ViewInfo);
  950.   SetTextStyle(TriplexFont, HorizDir, 4);
  951.   SetTextJustify(CenterText, CenterText);
  952.   with ViewInfo do
  953.     OutTextXY((x2-x1) div 2, (y2-y1) div 2, 'That''s all folks!');
  954.   StatusLine('Press any key to quit...');
  955.   repeat until KeyPressed;
  956. end; { SayGoodbye }
  957.  
  958.  
  959. PROCEDURE SelectMode;
  960. VAR
  961.     choice1,choice2     : CHAR;
  962.    xsize,ysize            : WORD;
  963. BEGIN
  964.     (* Let's select a mode *)
  965.     ClrScr;
  966.     WriteLn('VESADEMO:');
  967.     WriteLn('1. 256 colors');
  968.     WriteLn('2. 32768 colors');
  969.     WriteLn('3. 65536 colors');
  970.     WriteLn('4. 16777216 colors');
  971.     WriteLn('Q uit');
  972.     WriteLn;
  973.     Write('Your choice: ');
  974.     REPEAT
  975.         ReadLn(choice1);
  976.       IF choice1 <> '1' THEN BEGIN
  977.           WriteLn('Sorry !');
  978.          WriteLn('This demo wasn''t written for more as 256 colors !');
  979.          WriteLn('You would only get a limited impression of the Hi-& TrueColor modes...');
  980.          WriteLn('Switching to 256 colors.');
  981.          choice1 := '1';
  982.       END;
  983.     UNTIL choice1 IN ['1'..'4','q'];
  984.     IF choice1 = 'q' THEN Halt;
  985.  
  986.     WriteLn;
  987.     WriteLn;
  988.     WriteLn('a. 320x200');
  989.     WriteLn('b. 640x480');
  990.     WriteLn('c. 800x600');
  991.     WriteLn('d. 1024x768');
  992.     WriteLn('e. 1280x1024');
  993.     WriteLn('Q uit');
  994.     WriteLn;
  995.     Write('Your choice: ');
  996.     REPEAT
  997.         ReadLn(choice2);
  998.     UNTIL choice2 IN ['a'..'e','q'];
  999.     IF choice2 = 'q' THEN Halt;
  1000.  
  1001.     CASE choice2 OF
  1002.         'a' : BEGIN
  1003.             xsize := 320;
  1004.             ysize := 200;
  1005.         END;
  1006.         'b' : BEGIN
  1007.             xsize := 640;
  1008.             ysize := 480;
  1009.         END;
  1010.         'c' : BEGIN
  1011.             xsize := 800;
  1012.             ysize := 600;
  1013.         END;
  1014.         'd' : BEGIN
  1015.             xsize := 1024;
  1016.             ysize := 768;
  1017.         END;
  1018.         'e' : BEGIN
  1019.             xsize := 1280;
  1020.             ysize := 1024;
  1021.         END;
  1022.     END;
  1023.     CASE choice1 OF
  1024.         '1' : mode := FindVesaMode(xsize,ysize,8);
  1025.         '2' : mode := FindVesaMode(xsize,ysize,15);
  1026.         '3' : mode := FindVesaMode(xsize,ysize,16);
  1027.         '4' : mode := FindVesaMode(xsize,ysize,24);
  1028.     END;
  1029.     IF mode = 0 THEN BEGIN
  1030.         WriteLn('No such mode could be found !');
  1031.         WriteLn('Switching to to 320x200.');
  1032.         ReadKey;
  1033.         mode := V320x200x256;
  1034.     END;
  1035. END;
  1036.  
  1037. begin { program body }
  1038.   SelectMode;
  1039.   Initialize;
  1040.   ReportStatus;
  1041.  
  1042. {  AspectRatioPlay; }
  1043.   FillEllipsePlay;
  1044.   SectorPlay;
  1045.   WriteModePlay;
  1046.  
  1047.   ColorPlay;
  1048.   { PalettePlay only intended to work on these drivers: }
  1049.   if (GraphDriver = EGA) or
  1050.       (GraphDriver = EGA64) or
  1051.       (GraphDriver = VGA) then
  1052.      PalettePlay;
  1053.   PutPixelPlay;
  1054. {  PutImagePlay; }
  1055.   RandBarPlay;
  1056.   BarPlay;
  1057.   Bar3DPlay;
  1058.   ArcPlay;
  1059.   CirclePlay;
  1060.   PiePlay;
  1061.   LineToPlay;
  1062.   LineRelPlay;
  1063. {  LineStylePlay; }
  1064. {  UserLineStylePlay; }
  1065.   TextDump;
  1066.   TextPlay;
  1067.   CrtModePlay;
  1068.   FillStylePlay;
  1069.   FillPatternPlay;
  1070.   PolyPlay;
  1071.   SayGoodbye;
  1072. {  CloseGraph; }
  1073.   CloseVesa;
  1074. end.
  1075. ***************************************************
  1076.     '* SHOW D2ROTATE (ABOUT THE ORIGIN)
  1077.     '****************************************************************∞╥≤c≤*φè#^│v/╒:j═φ0t+l▓ô"¬"g└≡?%ªêΣ│H╫½╫╜├¿U'╒⌐⌡ ßV?╩
  1078. ¬ujOΦçEZ1∞▐! ▄B╛Σ8║æ]1GlNÜ┐q▌▓;ô$ΦzE<cª*bEô#ä╧ñÅ"∩─LrdaÖ ╠º╫a^¥£å╬1~)@ëÖMδ╫0═6DäFê¬Çv┼ß╨kæpτ╪É)}ª 1w3╤╧ü⌡¥╓h▓╣≈ïÅaÑ[TⁿHqªÉ╝DKÄ─Y-∞tT╤Θ╨º╟╪.*ÇI9lΦ≈{πτcσ$τπßoFr╪╨∩┼╞╟;O2■e²LÜ4^N|╪½ÅO?╔°FOz`╟╟╟'<>>π$πΘù6·
  1079. Xgî╖│°oîδπGƒd╝▀░?■╪╔_9L ⌡ôⁿq'æO▀ƒn4╔▀╚▄┼3pτ.òO°·}÷╕ⁿ±'æO?ít│!√8ßÑ≤/┐╣p┼≥┘E╦Vox╕cΦé5╟╚º╙$?√$≥ΘZεsî≡åìΓpKù¢ïß X╥ 9╞≈\µk┤O¥_ 5Üö\≤éÄ┌╤A[╤ÿáï┼éNⁿÅu16    g,%hc╙╨cD╨Vï┘R¢öKñR;8εáΣ╢╪ós╤π╡á└èxgzPÄMú╫yαºÉ+σJ¢i+▓â3╥    ═Ñ╙î^ºG▓█πérφçs %#(╗⌠?┼%u8≡6+QÉ))ò)Afw≈╣╪)B&4░åLXV:δät@Å.;5Φf╢Ät┐ΣJ╫─U8úÇ╟éö£╕p╔┴⌠vg╨╬╥é÷╪╣┬ΓI.ç≡^v╤ZΦÇ& ╒┌6ñô6XßNè╡╬E₧Ñ
  1080. kIº╠▄A+╣╥éb²tæ-Y¡½αÑa═uuîÇ╢αêvhuª╡SÅ┤vèùú¥F;p<d⌐/F─d█éT%▓KΦû=q■öI┐ ┐╠6S$▒÷╚ENΩ¥Fû9╔┌R'╝ ╧φ└?g┬j▓0═/b╖₧─mûé╢┌»ÿÄë/·<éò■░╤╟╢├Xσ:╥P3Θ"╬Læsφ░┌öSö!╗¿*mN£WΣÇ£┤~#╗ææ≥RΩóh:à▌.æ≈╕▌v£äàd▒à╒├=░╖π║$howeg*╬    6ù▄ƒô╕φ░Ö╢qΘD>(w@úKεHÆ╛öúΣU
  1081. éÜR╔╤W▄èê 2M%ó.▓SNÖA1ùJE╢║l]▓¿>\%└Å4ßO▄£â⌐& ê/)8vSP▀▓ôⁿææ√ü√ÑÄa⌠â╚4S╓╟P- ?Σá╕▓Næ*q╡UΘ▓≈^ñ·I.rúR&$Y^╚%è≡B┌≈Ceat
  1082.     Color := RandColor;
  1083.     SetColor(Color);
  1084.     SetFillStyle(Random(CloseDotFill)+1, Color);
  1085.     Bar3D(Random(MaxWidth), Random(MaxHeight),
  1086.           Random(MaxWidth), Random(MaxHeight), 0, TopOff);
  1087.   until KeyPressed;
  1088.   WaitToGo;
  1089. end; { RandBarPlay }
  1090.  
  1091. procedure ArcPlay;
  1092. { Draw random arcs on the screen }
  1093. var
  1094.   MaxRadius : word;
  1095.   EndAngle : word;
  1096.   ArcInfo : ArcCoordsType;
  1097. begin
  1098.   MainWindow('Arc / GetArcCoords demonstration');
  1099.   StatusLine('Esc aborts or press a key');
  1100.   MaxRadius := MaxY div 10;
  1101.   repeat
  1102.     SetColor(RandColor);
  1103.     EndAngle := Random(360);
  1104.     SetLineStyle(SolidLn, 0, NormWidth);
  1105.     Arc(Random(MaxX), Random(MaxY), Random(EndAngle), EndAngle, Random(MaxRadius));
  1106.     GetArcCoords(ArcInfo);
  1107.     with ArcInfo do
  1108.     begin
  1109.       Line(X, Y, XStart, YStart);
  1110.       Line(X, Y, Xend, Yend);
  1111.     end;
  1112.   until KeyPressed;
  1113.   WaitToGo;
  1114. end; { ArcPlay }
  1115.  
  1116. procedure PutPixelPlay;
  1117. { Demonstrate the PutPixel and GetPixel commands }
  1118. const
  1119.   Seed   = 1962; { A seed for the random number generator }
  1120.   NumPts = 2000; { The number of pixels plotted }
  1121.   Esc    = #27;
  1122. var
  1123.   I : word;
  1124.   X, Y, Color : word;
  1125.   XMax, YMax  : integer;
  1126.   ViewInfo    : ViewPortType;
  1127. begin
  1128.   MainWindow('PutPixel / GetPixel demonstration');
  1129.   StatusLine('Esc aborts or press a key...');
  1130.  
  1131.   GetViewSettings(ViewInfo);
  1132.   with ViewInfo do
  1133.   begin
  1134.     XMax := (x2-x1-1);
  1135.     YMax := (y2-y1-1);
  1136.   end;
  1137.  
  1138.   while not KeyPressed do
  1139.   begin
  1140.     { Plot random pixels }
  1141.     RandSeed := Seed;
  1142.     I := 0;
  1143.     while (not KeyPressed) and (I < NumPts) do
  1144.     begin
  1145.       Inc(I);
  1146.         PutPixel(Random(XMax)+1, Random(YMax)+1, RandColor);
  1147.     end;
  1148.  
  1149.     { Erase pixels }
  1150.     RandSeed := Seed;
  1151.     I := 0;
  1152.     while (not KeyPressed) and (I < NumPts) do
  1153.     begin
  1154.       Inc(I);
  1155.       X := Random(XMax)+1;
  1156.       Y := Random(YMax)+1;
  1157.       Color := GetPixel(X, Y);
  1158.         if Color = RandColor then
  1159.           PutPixel(X, Y, 0);
  1160.      end;
  1161.   end;
  1162.   WaitToGo;
  1163. end; { PutPixelPlay }
  1164.  
  1165. procedure PutImagePlay;
  1166. { Demonstrate the GetImage and PutImage commands }
  1167.  
  1168. const
  1169.   r  = 20;
  1170.   StartX = 100;
  1171.   StartY = 50;
  1172.  
  1173. var
  1174.   CurPort : ViewPortType;
  1175.  
  1176. procedure MoveSaucer(var X, Y : integer; Width, Height : integer);
  1177. var
  1178.   Step : integer;
  1179. begin
  1180.   Step := Random(2*r);
  1181.   if Odd(Step) then
  1182.     Step := -Step;
  1183.   X := X + Step;
  1184.   Step := Random(r);
  1185.   if Odd(Step) then
  1186.     Step := -Step;
  1187.   Y := Y + Step;
  1188.  
  1189.   { Make saucer bounce off viewport walls }
  1190.   with CurPort do
  1191.   begin
  1192.     if (x1 + X + Width - 1 > x2) then
  1193.       X := x2-x1 - Width + 1
  1194.     else
  1195.       if (X < 0) then
  1196.         X := 0;
  1197.     if (y1 + Y + Height - 1 > y2) then
  1198.       Y := y2-y1 - Height + 1
  1199.     else
  1200.       if (Y < 0) then
  1201.         Y := 0;
  1202.   end;
  1203. end; { MoveSaucer }
  1204.  
  1205. var
  1206.   Pausetime : word;
  1207.   Saucer    : pointer;
  1208.   X, Y      : integer;
  1209.   ulx, uly  : word;
  1210.   lrx, lry  : word;
  1211.   Size      : word;
  1212.   I         : word;
  1213. begin
  1214.   ClearDevice;
  1215.   FullPort;
  1216.  
  1217.   { PaintScreen }
  1218.   ClearDevice;
  1219.   MainWindow('GetImage / PutImage Demonstration');
  1220.   StatusLine('Esc aborts or press a key...');
  1221.   GetViewSettings(CurPort);
  1222.  
  1223.   { DrawSaucer }
  1224.   Ellipse(StartX, StartY, 0, 360, r, (r div 3)+2);
  1225.   Ellipse(StartX, StartY-4, 190, 357, r, r div 3);
  1226.   Line(StartX+7, StartY-6, StartX+10, StartY-12);
  1227.   Circle(StartX+10, StartY-12, 2);
  1228.   Line(StartX-7, StartY-6, StartX-10, StartY-12);
  1229.   Circle(StartX-10, StartY-12, 2);
  1230.   SetFillStyle(SolidFill, MaxColor);
  1231.   FloodFill(StartX+1, StartY+4, GetColor);
  1232.  
  1233.   { ReadSaucerImage }
  1234.   ulx := StartX-(r+1);
  1235.   uly := StartY-14;
  1236.   lrx := StartX+(r+1);
  1237.   lry := StartY+(r div 3)+3;
  1238.  
  1239.   Size := ImageSize(ulx, uly, lrx, lry);
  1240.   GetMem(Saucer, Size);
  1241.   GetImage(ulx, uly, lrx, lry, Saucer^);
  1242. {  PutImage(ulx, uly, Saucer^, XORput);               { erase image }
  1243.  
  1244.   { Plot some "stars" }
  1245.   for I := 1 to 1000 do
  1246.      PutPixel(Random(MaxX), Random(MaxY), RandColor);
  1247.   X := MaxX div 2;
  1248.   Y := MaxY div 2;
  1249.   PauseTime := 70;
  1250.  
  1251.   { Move the saucer around }
  1252.   repeat
  1253. {     PutImage(X, Y, Saucer^, XORput);                 { draw image }
  1254.      Delay(PauseTime);
  1255. {     PutImage(X, Y, Saucer^, XORput);                 { erase image }
  1256.      MoveSaucer(X, Y, lrx - ulx + 1, lry - uly + 1);  { width/height }
  1257.   until KeyPressed;
  1258.   FreeMem(Saucer, size);
  1259.   WaitToGo;
  1260. end; { PutImagePlay }
  1261.  
  1262. procedure PolyPlay;
  1263. { Draw random polygons with random fill styles on the screen }
  1264. const
  1265.   MaxPts = 5;
  1266. type
  1267.   PolygonType = array[1..MaxPts] of PointType;
  1268. var
  1269.   Poly : PolygonType;
  1270.   I, Color : word;
  1271. begin
  1272.   MainWindow('FillPoly demonstration');
  1273.   StatusLine('Esc aborts or press a key...');
  1274.   repeat
  1275.     Color := RandColor;
  1276.     SetFillStyle(Random(11)+1, Color);
  1277.     SetColor(Color);
  1278.     for I := 1 to MaxPts do
  1279.       with Poly[I] do
  1280.       begin
  1281.         X := Random(MaxX);
  1282.         Y := Random(MaxY);
  1283.       end;
  1284.     FillPoly(MaxPts, Poly);
  1285.   until KeyPressed;
  1286.   WaitToGo;
  1287. end; { PolyPlay }
  1288.  
  1289. procedure FillStylePlay;
  1290. { Display all of the predefined fill styles available }
  1291. var
  1292.   Style    : word;
  1293.   Width    : word;
  1294.   Height   : word;
  1295.   X, Y     : word;
  1296.   I, J     : word;
  1297.   ViewInfo : ViewPortType;
  1298.  
  1299. procedure DrawBox(X, Y : word);
  1300. begin
  1301.   SetFillStyle(Style, MaxColor);
  1302.   with ViewInfo do
  1303.     Bar(X, Y, X+Width, Y+Height);
  1304.   Rectangle(X, Y, X+Width, Y+Height);
  1305.   OutTextXY(X+(Width div 2), Y+Height+4, Int2Str(Style));
  1306.   Inc(Style);
  1307. end; { DrawBox }
  1308.  
  1309. begin
  1310.   MainWindow('Pre-defined fill styles');
  1311.   GetViewSettings(ViewInfo);
  1312.   with ViewInfo do
  1313.   begin
  1314.     Width := 2 * ((x2+1) div 13);
  1315.     Height := 2 * ((y2-10) div 10);
  1316.   end;
  1317.   X := Width div 2;
  1318.   Y := Height div 2;
  1319.   Style := 0;
  1320.   for J := 1 to 3 do
  1321.   begin
  1322.     for I := 1 to 4 do
  1323.     begin
  1324.       DrawBox(X, Y);
  1325.       Inc(X, (Width div 2) * 3);
  1326.     end;
  1327.     X := Width div 2;
  1328.     Inc(Y, (Height div 2) * 3);
  1329.   end;
  1330.   SetTextJustify(LeftText, TopText);
  1331.   WaitToGo;
  1332. end; { FillStylePlay }
  1333.  
  1334. procedure FillPatternPlay;
  1335. { Display some user defined fill patterns }
  1336. const
  1337.   Patterns : array[0..11] of FillPatternType = (
  1338.   ($AA, $55, $AA, $55, $AA, $55, $AA, $55 üÖü üÖü  !BBäx!!!BBäx!BBäx"""DDêp""DDêp>"""BBääêp""!"BDäêêp>IÉÆ|      ° @≥î>00>><Dêx  !BBäx""DDêp&<"DDêê&22TTêêê$> $< @äêp>          ⁿBBBB<  @@Ç****DDDDDDDU¬U¬U¬U¬U¬U¬U¬▌w▌w▌w▌w▌w▌w▌w°°°≥■°°≥≥■≥≥■■°°°    ≤  ≤  ≤≤         °                     ≡≡≡≡≡≡≡≡≡≡≡≡≡≡       ;DDD;    $"Bdÿ>@@@>||>Ac]AAA1N"A""2,  `1NA"*III*<Bü üB<<BüüüB<A" \"QIE" < <BBBB  @@    ~ ?  @ÇB$$B ""A$$"AII6 üBr»$**IIII**ccregion.  The region is defined as any pixel of
  1339.             OldColor which has a path of pixels of OldColor or NewColor
  1340.             with sides touching back to the seed point, (XSeed, YSeed).
  1341.             Therefore, only pixels of OldColor are modified and no other
  1342.             information is changed.
  1343.  
  1344.             SEE ALSO
  1345.  
  1346.             DRWFILLBOX, DRWFILLCIRCLE, DRWFILLELLIPSE, FILLAREA,
  1347.             FILLCONVEXPOLY, FILLPAGE, FILLPOLY, FILLSCREEN, FILLVIEW,
  1348.             SETVIEW
  1349.  
  1350.             EXAMPL(HNxHHO$B<BBBB<$<BBBB<<BBBB<$BBBBBF:0BBBBF:$BBBF:B<""AAA""AAAAA"<B@@B<" <2\A">>xDDxDNDD <` <>BB= > <BBBB< BBBBF:2L\bBBBB&AaQIECA8$>""">0@@A>@@@ b$(. b$(*
  1351.     $    $    $DDDDDDD¬U¬U¬U¬U¬U¬U¬Uw▌w▌w▌w▌w▌w▌w▌°°°⌠ⁿ°°⌠⌠ⁿ⌠⌠ⁿⁿ°°°    ≈  ≈  ≈≈         °                     ≡≡≡≡≡≡≡≡≡≡≡≡≡≡       7HH7"B\DBBRL~BB@@@@@@?R~!!~?DDDD8BBBB|@@Ç>P>III>"AA""AAA"Uw<DDDD86II6"EIQ"\ @@ "AAAAA> >     hH02L2L$$<H(,$<>>>>>>>         VMODE=VIDEOMODEGET
  1352.             IF WHICHVGA = 0 THEN STOP
  1353.             DUMMY=RES640
  1354.             SETVIEW 100, 100, 539, 379
  1355.             FILLVIEW 10
  1356.             WHILE INKEY$ = ""
  1357.             WEND
  1358.             VIDEOMODESET VMODE
  1359.             END
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.                                                                          63
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.           FONTGETINFO
  1384.  
  1385.             PROTOTYPE
  1386.  
  1387.             SUB FONTGETINFO (Width%, Height%)
  1388.  
  1389.             INPUT
  1390.  
  1391.             no input parameters
  1392.     WEND
  1393.             MOUSEEXIT
  1394.             VIDEOMODESET VMODE
  1395.             END
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.                                                                          86
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.           MOUSECURSORDEFAULT
  1444.  
  1445.             PROTOTYPE
  1446.  
  1447.             SUB MOUSECURSORDEFAULT ()
  1448.  
  1449.             INPUT
  1450.  
  1451.             no input parameters
  1452.  
  1453.             OUTPUT
  1454.  
  1455.             no value returned
  1456.  
  1457.             USAGE
  1458.  
  1459.             MOUSECURSORDEFAULT defines the mouse cursor to be a small
  1460.        ,K$╖┼╘╤░XQ)σ┤ö≡÷┴─┤àñT┘,╘¬àñX9╘⌠àñ\9╘UÜ╢≤`9╘4a╘d9╘UTa╘h9╘ta╘l9╘Uöa╘p9╘┤a╘t┘PT±x┴îÇ╖0▓ïα│ÅαU┤ôα╡ùα╢¢α╖úΓ╘pǺΓ╕¡αë ╚┴πì°sKÉφb<$⌡▌ë     φë φë I1φë  Eφë $YφÆë (mφë ,üφë 0$òφë á⌐φë ñ╜φë I¿╤φë ¼σφë ░∙φÆë 4
  1461. ²ë ┤!²ë ╕$5²ë ╝I²ë └]²ë ⌐8q²ë <àⁿΦiǬ∙PÖÇ ¥Ç
  1462. ░╨â@%8@ΓΦá╝╤░≡cÑÅ*$
  1463. ░╕≡ż≡τ╥m¿⌡ε    ╨@#µ≈$âh$âαra╨à`¥è∩Ç%Ç +─▀ TîcOî∩â°1<@  [$¿Ç¼ MMl·0ƒ Y¼─!%6a▐è ¥ì ßá+?±  P<îaTTV ╪iÇ¡≥░ `_ñ»%Çá᪠P█º»ε`éa∙É%H«┴íA%Gár∙É
  1464. iw∙Éiφ`╧≥≡╤Çmⁿ▒
  1465. ]ÆAáσw7░⌡∩    $·╟Ç√É&^`  ┐ $ⁿ  $■ $╒ nk$J-ÉQ1£PéBù »0αQ/Ñ4╜£░ºP≈Ñ4Ç⌡$(ª▀$@C]Æé≈└╕_SÇçÑ4=iÉ⌠ä╣<_np@Ñ45ò▒Y3ü¼Qí░.i>╠@5+┴╙É╛╙$@ #┴@«╦
  1466. $╤
  1467. #@Ñú4,p&e÷ü¼_ÇQºÑ4
  1468. òQ  ü@;¡_áQ@e╠≥@mp!┤a╘O░√`Pñź ÇT°8ÿ!¼Åñ$½╙"q¿ PñCÇ¿α√└╥░eT"ß<p°%Pæ(╧%pδ¥/OêW0Ǽbφ φ B@[â¼8â≥µ≤(    ¿⌡%(Ç∩áTÿp+ óÜ▓0!Σ±(1±
  1469. ░┤ÖÇD└D0Å╡`   $ «îO@╧1
  1470. a╝╤j-0ñ│`@╖bΦaT1═⌠╝╤Σ²¼±,1öíî9lÿ28ÇÅ`Γî¿P²$,N0┴O0a╫δ≤0σú`°î╖#0δ≡└X▄1»Σî(▒¥Ç█Ñ"qá√1CÇú╟╨º Å
  1471. FT Θ²î└1ÇY0    w ²à░$@AÅ`╦Φ¼╘`▄1A  }┐Ç*5 ΩSδδî`¼îaδæ¼î5 1¿⌡Ω╜⌠ ¼¥╬ü└Qî1S
  1472. ╛≤î9╨iÇ,∙PU(}Ç$üÇ àÇ`σìÇ`QαÜBO$%ÿÇ╧"$Ç«Ç]É.┬\`%WÉ$  W0 ÄâO0]αG┬ur╩
  1473. ░£▒
  1474. Q¢ú╔Ç≡°s?`X0╘`@ µWâ@╣aá εdq`¥9?Ç&+o0µyÄΣAÅuV(7P╬±@IdQ╕@Å┤@;Ç▓?Çò│CÇ┤╟╨╡KÇÄ30ⁿφ° ó╬ì+]Ä╦≡     Mö╝σ ²y5<!└▀óâ╝É3~mp    $<╛≤9Æ-2ⁿ≡@T,╞Σa,)Pæ└¥#¼╪Q┤S(¼@Aîa
  1475. ≡╤@Ö²±⌠KëD─┴▒▀0╨Ñ$╩-0 ╨ê*╙▓edm`î=3Kß-10è=≥≤²└£mîjy ÿe²ⁿ╨i╕e▓ΣmαÖ╢C%Ç*ê*0 EátQZ`mÄLP%    °üⁿªüNQ∙  T¿<qtWΩc z░ÅÇñΩçǪçÇ«;└<┐á¼¥. á?<Σscî)áí := 0;
  1476.       end;
  1477.     end;
  1478.   end;
  1479.   WaitToGo;
  1480. end; { UserLineStylePlay }
  1481.  
  1482.  
  1483. procedure SayGoodbye;
  1484. { Say goodbye and then exit the program }
  1485. var
  1486.   ViewInfo : ViewPortType;
  1487. begin
  1488.   MainWindow('');
  1489.   GetViewSettings(ViewInfo);
  1490.   SetTextStyle(TriplexFont, HorizDir, 4);
  1491.   SetTextJustify(CenterText, CenterText);
  1492.   with ViewInfo do
  1493.     OutTextXY((x2-x1) div 2, (y2-y1) div 2, 'That''s all folks!');
  1494.   StatusLine('Press any key to quit...');
  1495.   repeat until KeyPressed;
  1496. end; { SayGoodbye }
  1497.  
  1498.  
  1499. PROCEDURE SelectMode;
  1500. VAR
  1501.     choice1,choice2     : CHAR;
  1502.    xsize,ysize            : WORD;
  1503. BEGIN
  1504.     (* Let's select a mode *)
  1505.     ClrScr;
  1506.     WriteLn('VESADEMO:');
  1507.     WriteLn('1. 256 colors');
  1508.     WriteLn('2. 32768 colors');
  1509.     WriteLn('3. 65536 colors');
  1510.     WriteLn('4. 16777216 colors');
  1511.     WriteLn('Q uit');
  1512.     WriteLn;
  1513.     Write('Your choice: ');
  1514.     REPEAT
  1515.         ReadLn(choice1);
  1516.       IF choice1 <> '1' THEN BEGIN
  1517.           WriteLn('Sorry !');
  1518.          WriteLn('This demo wasn''t written for more as 256 colors !');
  1519.          WriteLn('You would only get a limited impression of the Hi-& TrueColor modes...');
  1520.          WriteLn('Switching to 256 colors.');
  1521.          choice1 := '1';
  1522.       END;
  1523.     UNTIL choice1 IN ['1'..'4','q'];
  1524.     IF choice1 = 'q' THEN Halt;
  1525.  
  1526.     WriteLn;
  1527.     WriteLn;
  1528.     WriteLn('a. 320x200');
  1529.     WriteLn('b. 640x480');
  1530.     WriteLn('c. 800x600');
  1531.     WriteLn('d. 1024x768');
  1532.     WriteLn('e. 1280x1024');
  1533.     WriteLn('Q uit');
  1534.     WriteLn;
  1535.     Write('Your choice: ');
  1536.     REPEAT
  1537.         ReadLn(choice2);
  1538.     UNTIL choice2 IN ['a'..'e','q'];
  1539.     IF choice2 = 'q' THEN Halt;
  1540.  
  1541.     CASE choice2 OF
  1542.         'a' : BEGIN
  1543.             xsize := 320;
  1544.             ysize := 200;
  1545.         END;
  1546.         'b' : BEGIN
  1547.             xsize := 640;
  1548.             ysize := 480;
  1549.         END;
  1550.         'c' : BEGIN
  1551.             xsize := 800;
  1552.             ysize := 600;
  1553.         END;
  1554.         'd' : BEGIN
  1555.             xsize := 1024;
  1556.             ysize := 768;
  1557.         END;
  1558.         'e' : BEGIN
  1559.             xsize := 1280;
  1560.             ysize := 1024;
  1561.         END;
  1562.     END;
  1563.     CASE choice1 OF
  1564.         '1' : mode := FindVesaMode(xsize,ysize,8);
  1565.         '2' : mode := FindVesaMode(xsize,ysize,15);
  1566.         '3' : mode := FindVesaMode(xsize,ysize,16);
  1567.         '4' : mode := FindVesaMode(xsize,ysize,24);
  1568.     END;
  1569.     IF mode = 0 THEN BEGIN
  1570.         WriteLn('No such mode could be found !');
  1571.         WriteLn('Switching to to 320x200.');
  1572.         ReadKey;
  1573.         mode := V320x200x256;
  1574.     END;
  1575. END;
  1576.  
  1577. begin { program body }
  1578.   SelectMode;
  1579.   Initialize;
  1580.   ReportStatus;
  1581.  
  1582. {  AspectRatioPlay; }
  1583.   FillEllipsePlay;
  1584.   SectorPlay;
  1585.   WriteModePlay;
  1586.  
  1587.   ColorPlay;
  1588.   { PalettePlay only intended to work on these drivers: }
  1589.   if (GraphDriver = EGA) or
  1590.       (GraphDriver = EGA64) or
  1591.       (GraphDriver = VGA) then
  1592.      PalettePlay;
  1593.   PutPixelPlay;
  1594. {  PutImagePlay; }
  1595.   RandBarPlay;
  1596.   BarPlay;
  1597.   Bar3DPlay;
  1598.   ArcPlay;
  1599.   CirclePlay;
  1600.   PiePlay;
  1601.   LineToPlay;
  1602.   LineRelPlay;
  1603. {  LineStylePlay; }
  1604. {  UserLineStylePlay; }
  1605.   TextDump;
  1606.   TextPlay;
  1607.   CrtModePlay;
  1608.   FillStylePlay;
  1609.   FillPatternPlay;
  1610.   PolyPlay;
  1611.   SayGoodbye;
  1612. {  CloseGraph; }
  1613.   CloseVesa;
  1614. end.
  1615. ***************************************************
  1616.     '* SHOW D2ROTATE (ABOUT THE ORIGIN)
  1617.     '****************************************************************∞╥≤c≤*φè#^│v/╒:j═φ0t+l▓ô"¬"g└≡?%ªêΣ│H╫½╫╜├¿U'╒⌐⌡ ßV?╩
  1618. ¬ujOΦçEZ1∞▐! ▄B╛Σ8║æ]1GlNÜ┐q▌▓;ô$ΦzE<cª*bEô#ä╧ñÅ"∩─LrdaÖ ╠º╫a^¥£å╬1~)@ëÖMδ╫0═6DäFê¬Çv┼ß╨kæpτ╪É)}ª 1w3╤╧ü⌡¥╓h▓╣≈ïÅaÑ[TⁿHqªÉ╝DKÄ─Y-∞tT╤Θ╨º╟╪.*ÇI9lΦ≈{πτcσ$τπßoFr╪╨∩┼╞╟;O2■e²LÜ4^N|╪½ÅO?╔°FOz`╟╟╟'<>>π$πΘù6·
  1619. Xgî╖│°oîδπGƒd╝▀░?■╪╔_9L ⌡ôⁿq'æO▀ƒn4╔▀╚▄┼3pτ.òO°·}÷╕ⁿ±'æO?ít│!√8ßÑ≤/┐╣p┼≥┘E╦Vox╕cΦé5╟╚º╙$?√$≥ΘZεsî≡åìΓpKù¢ïß X╥ 9╞≈\µk┤O¥_ 5Üö\≤éÄ┌╤A[╤ÿáï┼éNⁿÅu16    g,%hc╙╨cD╨Vï┘R¢öKñR;8εáΣ╢╪ós╤π╡á└èxgzPÄMú╫yαºÉ+σJ¢i+▓â3╥    ═Ñ╙î^ºG▓█πérφçs %#(╗⌠?┼%u8≡6+QÉ))ò)Afw≈╣╪)B&4░åLXV:δät@Å.;5Φf╢Ät┐ΣJ╫─U8úÇ╟éö£╕p╔┴⌠vg╨╬╥é÷╪╣┬ΓI.ç≡^v╤ZΦÇ& ╒┌6ñô6XßNè╡╬E₧Ñ
  1620. kIº╠▄A+╣╥éb²tæ-Y¡½αÑa═uuîÇ╢αêvhuª╡SÅ┤vèùú¥F;p<d⌐/F─d█éT%▓KΦû=q■öI┐ ┐╠6S$▒÷╚ENΩ¥Fû9╔┌R'╝ ╧φ└?g┬j▓0═/b╖₧─mûé╢┌»ÿÄë/·<éò■░╤╟╢├Xσ:╥P3Θ"╬Læsφ░┌öSö!╗¿*mN£WΣÇ£┤~#╗ææ≥RΩóh:à▌.æ≈╕▌v£äàd▒à╒├=░╖π║$howeg*╬    6ù▄ƒô╕φ░Ö╢qΘD>(w@úKεHÆ╛öúΣU
  1621. éÜR╔╤W▄èê 2M%ó.▓SNÖA1ùJE╢║l]▓¿>\%└Å4ßO▄£â⌐& ê/)8vSP▀▓ôⁿææ√ü√ÑÄa⌠â╚4S╓╟P- ?Σá╕▓Næ*q╡UΘ▓≈^ñ·I.rúR&$Y^╚%è≡B┌≈Ceat
  1622.     Color := RandColor;
  1623.     SetColor(Color);
  1624.     SetFillStyle(Random(CloseDotFill)+1, Color);
  1625.     Bar3D(Random(MaxWidth), Random(MaxHeight),
  1626.           Random(MaxWidth), Random(MaxHeight), 0, TopOff);
  1627.   until KeyPressed;
  1628.   WaitToGo;
  1629. end; { RandBarPlay }
  1630.  
  1631. procedure ArcPlay;
  1632. { Draw random arcs on the screen }
  1633. var
  1634.   MaxRadius : word;
  1635.   EndAngle : word;
  1636.   ArcInfo : ArcCoordsType;
  1637. begin
  1638.   MainWindow('Arc / GetArcCoords demonstration');
  1639.   StatusLine('Esc aborts or press a key');
  1640.   MaxRadius := MaxY div 10;
  1641.   repeat
  1642.     SetColor(RandColor);
  1643.     EndAngle := Random(360);
  1644.     SetLineStyle(SolidLn, 0, NormWidth);
  1645.     Arc(Random(MaxX), Random(MaxY), Random(EndAngle), EndAngle, Random(MaxRadius));
  1646.     GetArcCoords(ArcInfo);
  1647.     with ArcInfo do
  1648.     begin
  1649.       Line(X, Y, XStart, YStart);
  1650.       Line(X, Y, Xend, Yend);
  1651.     end;
  1652.   until KeyPressed;
  1653.   WaitToGo;
  1654. end; { ArcPlay }
  1655.  
  1656. procedure PutPixelPlay;
  1657. { Demonstrate the PutPixel and GetPixel commands }
  1658. const
  1659.   Seed   = 1962; { A seed for the random number generator }
  1660.   NumPts = 2000; { The number of pixels plotted }
  1661.   Esc    = #27;
  1662. var
  1663.   I : word;
  1664.   X, Y, Color : word;
  1665.   XMax, YMax  : integer;
  1666.   ViewInfo    : ViewPortType;
  1667. begin
  1668.   MainWindow('PutPixel / GetPixel demonstration');
  1669.   StatusLine('Esc aborts or press a key...');
  1670.  
  1671.   GetViewSettings(ViewInfo);
  1672.   with ViewInfo do
  1673.   begin
  1674.     XMax := (x2-x1-1);
  1675.     YMax := (y2-y1-1);
  1676.   end;
  1677.  
  1678.   while not KeyPressed do
  1679.   begin
  1680.     { Plot random pixels }
  1681.     RandSeed := Seed;
  1682.     I := 0;
  1683.     while (not KeyPressed) and (I < NumPts) do
  1684.     begin
  1685.       Inc(I);
  1686.         PutPixel(Random(XMax)+1, Random(YMax)+1, RandColor);
  1687.     end;
  1688.  
  1689.     { Erase pixels }
  1690.     RandSeed := Seed;
  1691.     I := 0;
  1692.     while (not KeyPressed) and (I < NumPts) do
  1693.     begin
  1694.       Inc(I);
  1695.       X := Random(XMax)+1;
  1696.       Y := Random(YMax)+1;
  1697.       Color := GetPixel(X, Y);
  1698.         if Color = RandColor then
  1699.           PutPixel(X, Y, 0);
  1700.      end;
  1701.   end;
  1702.   WaitToGo;
  1703. end; { PutPixelPlay }
  1704.  
  1705. procedure PutImagePlay;
  1706. { Demonstrate the GetImage and PutImage commands }
  1707.  
  1708. const
  1709.   r  = 20;
  1710.   StartX = 100;
  1711.   StartY = 50;
  1712.  
  1713. var
  1714.   CurPort : ViewPortType;
  1715.  
  1716. procedure MoveSaucer(var X, Y : integer; Width, Height : integer);
  1717. var
  1718.   Step : integer;
  1719. begin
  1720.   Step := Random(2*r);
  1721.   if Odd(Step) then
  1722.     Step := -Step;
  1723.   X := X + Step;
  1724.   Step := Random(r);
  1725.   if Odd(Step) then
  1726.     Step := -Step;
  1727.   Y := Y + Step;
  1728.  
  1729.   { Make saucer bounce off viewport walls }
  1730.   with CurPort do
  1731.   begin
  1732.     if (x1 + X + Width - 1 > x2) then
  1733.       X := x2-x1 - Width + 1
  1734.     else
  1735.       if (X < 0) then
  1736.         X := 0;
  1737.     if (y1 + Y + Height - 1 > y2) then
  1738.       Y := y2-y1 - Height + 1
  1739.     else
  1740.       if (Y < 0) then
  1741.         Y := 0;
  1742.   end;
  1743. end; { MoveSaucer }
  1744.  
  1745. var
  1746.   Pausetime : word;
  1747.   Saucer    : pointer;
  1748.   X, Y      : integer;
  1749.   ulx, uly  : word;
  1750.   lrx, lry  : word;
  1751.   Size      : word;
  1752.   I         : word;
  1753. begin
  1754.   ClearDevice;
  1755.   FullPort;
  1756.  
  1757.   { PaintScreen }
  1758.   ClearDevice;
  1759.   MainWindow('GetImage / PutImage Demonstration');
  1760.   StatusLine('Esc aborts or press a key...');
  1761.   GetViewSettings(CurPort);
  1762.  
  1763.   { DrawSaucer }
  1764.   Ellipse(StartX, StartY, 0, 360, r, (r div 3)+2);
  1765.   Ellipse(StartX, StartY-4, 190, 357, r, r div 3);
  1766.   Line(StartX+7, StartY-6, StartX+10, StartY-12);
  1767.   Circle(StartX+10, StartY-12, 2);
  1768.   Line(StartX-7, StartY-6, StartX-10, StartY-12);
  1769.   Circle(StartX-10, StartY-12, 2);
  1770.   SetFillStyle(SolidFill, MaxColor);
  1771.   FloodFill(StartX+1, StartY+4, GetColor);
  1772.  
  1773.   { ReadSaucerImage }
  1774.   ulx := StartX-(r+1);
  1775.   uly := StartY-14;
  1776.   lrx := StartX+(r+1);
  1777.   lry := StartY+(r div 3)+3;
  1778.  
  1779.   Size := ImageSize(ulx, uly, lrx, lry);
  1780.   GetMem(Saucer, Size);
  1781.   GetImage(ulx, uly, lrx, lry, Saucer^);
  1782. {  PutImage(ulx, uly, Saucer^, XORput);               { erase image }
  1783.  
  1784.   { Plot some "stars" }
  1785.   for I := 1 to 1000 do
  1786.      PutPixel(Random(MaxX), Random(MaxY), RandColor);
  1787.   X := MaxX div 2;
  1788.   Y := MaxY div 2;
  1789.   PauseTime := 70;
  1790.  
  1791.   { Move the saucer around }
  1792.   repeat
  1793. {     PutImage(X, Y, Saucer^, XORput);                 { draw image }
  1794.      Delay(PauseTime);
  1795. {     PutImage(X, Y, Saucer^, XORput);                 { erase image }
  1796.      MoveSaucer(X, Y, lrx - ulx + 1, lry - uly + 1);  { width/height }
  1797.   until KeyPressed;
  1798.   FreeMem(Saucer, size);
  1799.   WaitToGo;
  1800. end; { PutImagePlay }
  1801.  
  1802. procedure PolyPlay;
  1803. { Draw random polygons with random fill styles on the screen }
  1804. const
  1805.   MaxPts = 5;
  1806. type
  1807.   PolygonType = array[1..MaxPts] of PointType;
  1808. var
  1809.   Poly : PolygonType;
  1810.   I, Color : word;
  1811. begin
  1812.   MainWindow('FillPoly demonstration');
  1813.   StatusLine('Esc aborts or press a key...');
  1814.   repeat
  1815.     Color := RandColor;
  1816.     SetFillStyle(Random(11)+1, Color);
  1817.     SetColor(Color);
  1818.     for I := 1 to MaxPts do
  1819.       with Poly[I] do
  1820.       begin
  1821.         X := Random(MaxX);
  1822.         Y := Random(MaxY);
  1823.       end;
  1824.     FillPoly(MaxPts, Poly);
  1825.   until KeyPressed;
  1826.   WaitToGo;
  1827. end; { PolyPlay }
  1828.  
  1829. procedure FillStylePlay;
  1830. { Display all of the predefined fill styles available }
  1831. var
  1832.   Style    : word;
  1833.   Width    : word;
  1834.   Height   : word;
  1835.   X, Y     : word;
  1836.   I, J     : word;
  1837.   ViewInfo : ViewPortType;
  1838.  
  1839. procedure DrawBox(X, Y : word);
  1840. begin
  1841.   SetFillStyle(Style, MaxColor);
  1842.   with ViewInfo do
  1843.     Bar(X, Y, X+Width, Y+Height);
  1844.   Rectangle(X, Y, X+Width, Y+Height);
  1845.   OutTextXY(X+(Width div 2), Y+Height+4, Int2Str(Style));
  1846.   Inc(Style);
  1847. end; { DrawBox }
  1848.  
  1849. begin
  1850.   MainWindow('Pre-defined fill styles');
  1851.   GetViewSettings(ViewInfo);
  1852.   with ViewInfo do
  1853.   begin
  1854.     Width := 2 * ((x2+1) div 13);
  1855.     Height := 2 * ((y2-10) div 10);
  1856.   end;
  1857.   X := Width div 2;
  1858.   Y := Height div 2;
  1859.   Style := 0;
  1860.   for J := 1 to 3 do
  1861.   begin
  1862.     for I := 1 to 4 do
  1863.     begin
  1864.       DrawBox(X, Y);
  1865.       Inc(X, (Width div 2) * 3);
  1866.     end;
  1867.     X := Width div 2;
  1868.     Inc(Y, (Height div 2) * 3);
  1869.   end;
  1870.   SetTextJustify(LeftText, TopText);
  1871.   WaitToGo;
  1872. end; { FillStylePlay }
  1873.  
  1874. procedure FillPatternPlay;
  1875. { Display some user defined fill patterns }
  1876. const
  1877.   Patterns : array[0..11] of FillPatternType = (
  1878.   ($AA, $55, $AA, $55, $AA, $55, $AA, $55 üÖü üÖü  !BBäx!!!BBäx!BBäx"""DDêp""DDêp>"""BBääêp""!"BDäêêp>IÉÆ|      ° @≥î>00>><Dêx  !BBäx""DDêp&<"DDêê&22TTêêê$> $< @äêp>          ⁿBBBB<  @@Ç****DDDDDDDU¬U¬U¬U¬U¬U¬U¬▌w▌w▌w▌w▌w▌w▌w°°°≥■°°≥≥■≥≥■■°°°    ≤  ≤  ≤≤         °                     ≡≡≡≡≡≡≡≡≡≡≡≡≡≡       ;DDD;    $"Bdÿ>@@@>||>Ac]AAA1N"A""2,  `1NA"*III*<Bü üB<<BüüüB<A" \"QIE" < <BBBB  @@    ~ ?  @ÇB$$B ""A$$"AII6 üBr»$**IIII**ccregion.  The region is defined as any pixel of
  1879.             OldColor which has a path of pixels of OldColor or NewColor
  1880.             with sides touching back to the seed point, (XSeed, YSeed).
  1881.             Therefore, only pixels of OldColor are modified and no other
  1882.             information is changed.
  1883.  
  1884.             SEE ALSO
  1885.  
  1886.             DRWFILLBOX, DRWFILLCIRCLE, DRWFILLELLIPSE, FILLAREA,
  1887.             FILLCONVEXPOLY, FILLPAGE, FILLPOLY, FILLSCREEN, FILLVIEW,
  1888.             SETVIEW
  1889.  
  1890.             EXAMPL(HNxHHO$B<BBBB<$<BBBB<<BBBB<$BBBBBF:0BBBBF:$BBBF:B<""AAA""AAAAA"<B@@B<" <2\A">>xDDxDNDD <` <>BB= > <BBBB< BBBBF:2L\bBBBB&AaQIECA8$>""">0@@A>@@@ b$(. b$(*
  1891.     $    $    $DDDDDDD¬U¬U¬U¬U¬U¬U¬Uw▌w▌w▌w▌w▌w▌w▌°°°⌠ⁿ°°⌠⌠ⁿ⌠⌠ⁿⁿ°°°    ≈  ≈  ≈≈         °                     ≡≡≡≡≡≡≡≡≡≡≡≡≡≡       7HH7"B\DBBRL~BB@@@@@@?R~!!~?DDDD8BBBB|@@Ç>P>III>"AA""AAA"Uw<DDDD86II6"EIQ"\ @@ "AAAAA> >     hH02L2L$$<H(,$<>>>>>>>         VMODE=VIDEOMODEGET
  1892.             IF WHICHVGA = 0 THEN STOP
  1893.             DUMMY=RES640
  1894.             SETVIEW 100, 100, 539, 379
  1895.             FILLVIEW 10
  1896.             WHILE INKEY$ = ""
  1897.             WEND
  1898.             VIDEOMODESET VMODE
  1899.             END
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.                                                                          63
  1917.  
  1918.  
  1919.  
  1920.  
  1921.  
  1922.  
  1923.           FONTGETINFO
  1924.  
  1925.             PROTOTYPE
  1926.  
  1927.             SUB FONTGETINFO (Width%, Height%)
  1928.  
  1929.             INPUT
  1930.  
  1931.             no input parameters
  1932.     WEND
  1933.             MOUSEEXIT
  1934.             VIDEOMODESET VMODE
  1935.             END
  1936.  
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944.  
  1945.  
  1946.  
  1947.  
  1948.  
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.                                                                          86
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.           MOUSECURSORDEFAULT
  1984.  
  1985.             PROTOTYPE
  1986.  
  1987.             SUB MOUSECURSORDEFAULT ()
  1988.  
  1989.             INPUT
  1990.  
  1991.             no input parameters
  1992.  
  1993.             OUTPUT
  1994.  
  1995.             no value returned
  1996.  
  1997.             USAGE
  1998.  
  1999.             MOUSECURSORDEFAULT defines the mouse cursor to be a small
  2000.        ,K$╖┼╘╤░XQ)σ┤ö≡÷┴─┤àñT┘,╘¬àñX9╘⌠àñ\9╘UÜ╢≤`9╘4a╘d9╘UTa╘h9╘ta╘l9╘Uöa╘p9╘┤a╘t┘PT±x┴îÇ╖0▓ïα│ÅαU┤ôα╡ùα╢¢α╖úΓ╘pǺΓ╕¡αë ╚┴πì°sKÉφb<$⌡▌ë     φë φë I1φë  Eφë $YφÆë (mφë ,üφë 0$òφë á⌐φë ñ╜φë I¿╤φë ¼σφë ░∙φÆë 4
  2001. ²ë ┤!²ë ╕$5²ë ╝I²ë └]²ë ⌐8q²ë <àⁿΦiǬ∙PÖÇ ¥Ç
  2002. ░╨â@%8@ΓΦá╝╤░≡cÑÅ*$
  2003. ░╕≡ż≡τ╥m¿⌡ε    ╨@#µ≈$âh$âαra╨à`¥è∩Ç%Ç +─▀ TîcOî∩â°1<@  [$¿Ç¼ MMl·0ƒ Y¼─!%6a▐è ¥ì ßá+?±  P<îaTTV ╪iÇ¡≥░ `_ñ»%Çá᪠P█º»ε`éa∙É%H«┴íA%Gár∙É
  2004. iw∙Éiφ`╧≥≡╤Çmⁿ▒
  2005. ]ÆAáσw7░⌡∩    $·╟Ç√É&^`  ┐ $ⁿ  $■ $╒ nk$J-ÉQ1£PéBù »0αQ/Ñ4╜£░ºP≈Ñ4Ç⌡$(ª▀$@C]Æé≈└╕_SÇçÑ4=iÉ⌠ä╣<_np@Ñ45ò▒Y3ü¼Qí░.i>╠@5+┴╙É╛╙$@ #┴@«╦
  2006. $╤
  2007. #@Ñú4,p&e÷ü¼_ÇQºÑ4
  2008. òQ  ü@;¡_áQ@e╠≥@mp!┤a╘O░√`Pñź ÇT°8ÿ!¼Åñ$½╙"q¿ PñCÇ¿α√└╥░eT"ß<p°%Pæ(╧%pδ¥/OêW0Ǽbφ φ B@[â¼8â≥µ≤(    ¿⌡%(Ç∩áTÿp+ óÜ▓0!Σ±(1±
  2009. ░┤ÖÇD└D0Å╡`   $ «îO@╧1
  2010. a╝╤j-0ñ│`@╖bΦaT1═⌠╝╤Σ²¼±,1öíî9lÿ28ÇÅ`Γî¿P²$,N0┴O0a╫δ≤0σú`°î╖#0δ≡└X▄1»Σî(▒¥Ç█Ñ"qá√1CÇú╟╨º Å
  2011. FT Θ²î└1ÇY0    w ²à░$@AÅ`╦Φ¼╘`▄1A  }┐Ç*5 ΩSδδî`¼îaδæ¼î5 1¿⌡Ω╜⌠ ¼¥╬ü└Qî1S
  2012. ╛≤î9╨iÇ,∙PU(}Ç$üÇ àÇ`σìÇ`QαÜBO$%ÿÇ╧"$Ç«Ç]É.┬\`%WÉ$  W0 ÄâO0]αG┬ur╩
  2013. ░£▒
  2014. Q¢ú╔Ç≡°s?`X0╘`@ µWâ@╣aá εdq`¥9?Ç&+o0µyÄΣAÅuV(7P╬±@IdQ╕@Å┤@;Ç▓?Çò│CÇ┤╟╨╡KÇÄ30ⁿφ° ó╬ì+]Ä╦≡     Mö╝σ ²y5<!└▀óâ╝É3~mp    $<╛≤9Æ-2ⁿ≡@T,╞Σa,)Pæ└¥#¼╪Q┤S(¼@Aîa
  2015. ≡╤@Ö²±⌠KëD─┴▒▀0╨Ñ$╩-0 ╨ê*╙▓edm`î=3Kß-10è=≥≤²└£mîjy ÿe²ⁿ╨i╕e▓ΣmαÖ╢C%Ç*ê*0 EátQZ`mÄLP%    °üⁿªüNQ∙  T¿<qtWΩc z░ÅÇñΩçǪçÇ«;└<┐á¼¥. á?<Σscî)áí := 0;
  2016.       end;
  2017.     end;
  2018.   end;
  2019.   WaitToGo;
  2020. end; { UserLineStylePlay }
  2021.  
  2022.  
  2023. procedure SayGoodbye;
  2024. { Say goodbye and then exit the program }
  2025. var
  2026.   ViewInfo : ViewPortType;
  2027. begin
  2028.   MainWindow('');
  2029.   GetViewSettings(ViewInfo);
  2030.   SetTextStyle(TriplexFont, HorizDir, 4);
  2031.   SetTextJustify(CenterText, CenterText);
  2032.   with ViewInfo do
  2033.     OutTextXY((x2-x1) div 2, (y2-y1) div 2, 'That''s all folks!');
  2034.   StatusLine('Press any key to quit...');
  2035.   repeat until KeyPressed;
  2036. end; { SayGoodbye }
  2037.  
  2038.  
  2039. PROCEDURE SelectMode;
  2040. VAR
  2041.     choice1,choice2     : CHAR;
  2042.    xsize,ysize            : WORD;
  2043. BEGIN
  2044.     (* Let's select a mode *)
  2045.     ClrScr;
  2046.     WriteLn('VESADEMO:');
  2047.     WriteLn('1. 256 colors');
  2048.     WriteLn('2. 32768 colors');
  2049.     WriteLn('3. 65536 colors');
  2050.     WriteLn('4. 16777216 colors');
  2051.     WriteLn('Q uit');
  2052.     WriteLn;
  2053.     Write('Your choice: ');
  2054.     REPEAT
  2055.         ReadLn(choice1);
  2056.       IF choice1 <> '1' THEN BEGIN
  2057.           WriteLn('Sorry !');
  2058.          WriteLn('This demo wasn''t written for more as 256 colors !');
  2059.          WriteLn('You would only get a limited impression of the Hi-& TrueColor modes...');
  2060.          WriteLn('Switching to 256 colors.');
  2061.          choice1 := '1';
  2062.       END;
  2063.     UNTIL choice1 IN ['1'..'4','q'];
  2064.     IF choice1 = 'q' THEN Halt;
  2065.  
  2066.     WriteLn;
  2067.     WriteLn;
  2068.     WriteLn('a. 320x200');
  2069.     WriteLn('b. 640x480');
  2070.     WriteLn('c. 800x600');
  2071.     WriteLn('d. 1024x768');
  2072.     WriteLn('e. 1280x1024');
  2073.     WriteLn('Q uit');
  2074.     WriteLn;
  2075.     Write('Your choice: ');
  2076.     REPEAT
  2077.         ReadLn(choice2);
  2078.     UNTIL choice2 IN ['a'..'e','q'];
  2079.     IF choice2 = 'q' THEN Halt;
  2080.  
  2081.     CASE choice2 OF
  2082.         'a' : BEGIN
  2083.             xsize := 320;
  2084.             ysize := 200;
  2085.         END;
  2086.         'b' : BEGIN
  2087.             xsize := 640;
  2088.             ysize := 480;
  2089.         END;
  2090.         'c' : BEGIN
  2091.             xsize := 800;
  2092.             ysize := 600;
  2093.         END;
  2094.         'd' : BEGIN
  2095.             xsize := 1024;
  2096.             ysize := 768;
  2097.         END;
  2098.         'e' : BEGIN
  2099.             xsize := 1280;
  2100.             ysize := 1024;
  2101.         END;
  2102.     END;
  2103.     CASE choice1 OF
  2104.         '1' : mode := FindVesaMode(xsize,ysize,8);
  2105.         '2' : mode := FindVesaMode(xsize,ysize,15);
  2106.         '3' : mode := FindVesaMode(xsize,ysize,16);
  2107.         '4' : mode := FindVesaMode(xsize,ysize,24);
  2108.     END;
  2109.     IF mode = 0 THEN BEGIN
  2110.         WriteLn('No such mode could be found !');
  2111.         WriteLn('Switching to to 320x200.');
  2112.         ReadKey;
  2113.         mode := V320x200x256;
  2114.     END;
  2115. END;
  2116.  
  2117. begin { program body }
  2118.   SelectMode;
  2119.   Initialize;
  2120.   ReportStatus;
  2121.  
  2122. {  AspectRatioPlay; }
  2123.   FillEllipsePlay;
  2124.   SectorPlay;
  2125.   WriteModePlay;
  2126.  
  2127.   ColorPlay;
  2128.   { PalettePlay only intended to work on these drivers: }
  2129.   if (GraphDriver = EGA) or
  2130.       (GraphDriver = EGA64) or
  2131.       (GraphDriver = VGA) then
  2132.      PalettePlay;
  2133.   PutPixelPlay;
  2134. {  PutImagePlay; }
  2135.   RandBarPlay;
  2136.   BarPlay;
  2137.   Bar3DPlay;
  2138.   ArcPlay;
  2139.   CirclePlay;
  2140.   PiePlay;
  2141.   LineToPlay;
  2142.   LineRelPlay;
  2143. {  LineStylePlay; }
  2144. {  UserLineStylePlay; }
  2145.   TextDump;
  2146.   TextPlay;
  2147.   CrtModePlay;
  2148.   FillStylePlay;
  2149.   FillPatternPlay;
  2150.   PolyPlay;
  2151.   SayGoodbye;
  2152. {  CloseGraph; }
  2153.   CloseVesa;
  2154. end.
  2155. ***************************************************
  2156.     '* SHOW D2ROTATE (ABOUT THE ORIGIN)
  2157.     '****************************************************************∞╥≤c≤*φè#^│v/╒:j═φ0t+l▓ô"¬"g└≡?%ªêΣ│H╫½╫╜├¿U'╒⌐⌡ ßV?╩
  2158. ¬ujOΦçEZ1∞▐! ▄B╛Σ8║æ]1GlNÜ┐q▌▓;ô$ΦzE<cª*bEô#ä╧ñÅ"∩─LrdaÖ ╠º╫a^¥£å╬1~)@ëÖMδ╫0═6DäFê¬Çv┼ß╨kæpτ╪É)}ª 1w3╤╧ü⌡¥╓h▓╣≈ïÅaÑ[TⁿHqªÉ╝DKÄ─Y-∞tT╤Θ╨º╟╪.*ÇI9lΦ≈{πτcσ$τπßoFr╪╨∩┼╞╟;O2■e²LÜ4^N|╪½ÅO?╔°FOz`╟╟╟'<>>π$πΘù6·
  2159. Xgî╖│°oîδπGƒd╝▀░?■╪╔_9L ⌡ôⁿq'æO▀ƒn4╔▀╚▄┼3pτ.òO°·}÷╕ⁿ±'æO?ít│!√8ßÑ≤/┐╣p┼≥┘E╦Vox╕cΦé5╟╚º╙$?√$≥ΘZεsî≡åìΓpKù¢ïß X╥ 9╞≈\µk┤O¥_ 5Üö\≤éÄ┌╤A[╤ÿáï┼éNⁿÅu16    g,%hc╙╨cD╨Vï┘R¢öKñR;8εáΣ╢╪ós╤π╡á└èxgzPÄMú╫yαºÉ+σJ¢i+▓â3╥    ═Ñ╙î^ºG▓█πérφçs %#(╗⌠?┼%u8≡6+QÉ))ò)Afw≈╣╪)B&4░åLXV:δät@Å.;5Φf╢Ät┐ΣJ╫─U8úÇ╟éö£╕p╔┴⌠vg╨╬╥é÷╪╣┬ΓI.ç≡^v╤ZΦÇ& ╒┌6ñô6XßNè╡╬E₧Ñ
  2160. kIº╠▄A+╣╥éb²tæ-Y¡½αÑa═uuîÇ╢αêvhuª╡SÅ┤vèùú¥F;p<d⌐/F─d█éT%▓KΦû=q■öI┐ ┐╠6S$▒÷╚ENΩ¥Fû9╔┌R'╝ ╧φ└?g┬j▓0═/b╖₧─mûé╢┌»ÿÄë/·<éò■░╤╟╢├Xσ:╥P3Θ"╬Læsφ░┌öSö!╗¿*mN£WΣÇ£┤~#╗ææ≥RΩóh:à▌.æ≈╕▌v£äàd▒à╒├=░╖π║$howeg*╬    6ù▄ƒô╕φ░Ö╢qΘD>(w@úKεHÆ╛öúΣU
  2161. éÜR╔╤W▄èê 2M%ó.▓SNÖA1ùJE╢║l]▓¿>\%└Å4ßO▄£â⌐& ê/)8vSP▀▓ôⁿææ√ü√ÑÄa⌠â╚4S╓╟P- ?Σá╕▓Næ*q╡UΘ▓≈^ñ·I.rúR&$Y^╚%è≡B┌≈Ceat
  2162.     Color := RandColor;
  2163.     SetColor(Color);
  2164.     SetFillStyle(Random(CloseDotFill)+1, Color);
  2165.     Bar3D(Random(MaxWidth), Random(MaxHeight),
  2166.           Random(MaxWidth), Random(MaxHeight), 0, TopOff);
  2167.   until KeyPressed;
  2168.   WaitToGo;
  2169. end; { RandBarPlay }
  2170.  
  2171. procedure ArcPlay;
  2172. { Draw random arcs on the screen }
  2173. var
  2174.   MaxRadius : word;
  2175.   EndAngle : word;
  2176.   ArcInfo : ArcCoordsType;
  2177. begin
  2178.   MainWindow('Arc / GetArcCoords demonstration');
  2179.   StatusLine('Esc aborts or press a key');
  2180.   MaxRadius := MaxY div 10;
  2181.   repeat
  2182.     SetColor(RandColor);
  2183.     EndAngle := Random(360);
  2184.     SetLineStyle(SolidLn, 0, NormWidth);
  2185.     Arc(Random(MaxX), Random(MaxY), Random(EndAngle), EndAngle, Random(MaxRadius));
  2186.     GetArcCoords(ArcInfo);
  2187.     with ArcInfo do
  2188.     begin
  2189.       Line(X, Y, XStart, YStart);
  2190.       Line(X, Y, Xend, Yend);
  2191.     end;
  2192.   until KeyPressed;
  2193.   WaitToGo;
  2194. end; { ArcPlay }
  2195.  
  2196. procedure PutPixelPlay;
  2197. { Demonstrate the PutPixel and GetPixel commands }
  2198. const
  2199.   Seed   = 1962; { A seed for the random number generator }
  2200.   NumPts = 2000; { The number of pixels plotted }
  2201.   Esc    = #27;
  2202. var
  2203.   I : word;
  2204.   X, Y, Color : word;
  2205.   XMax, YMax  : integer;
  2206.   ViewInfo    : ViewPortType;
  2207. begin
  2208.   MainWindow('PutPixel / GetPixel demonstration');
  2209.   StatusLine('Esc aborts or press a key...');
  2210.  
  2211.   GetViewSettings(ViewInfo);
  2212.   with ViewInfo do
  2213.   begin
  2214.     XMax := (x2-x1-1);
  2215.     YMax := (y2-y1-1);
  2216.   end;
  2217.  
  2218.   while not KeyPressed do
  2219.   begin
  2220.     { Plot random pixels }
  2221.     RandSeed := Seed;
  2222.     I := 0;
  2223.     while (not KeyPressed) and (I < NumPts) do
  2224.     begin
  2225.       Inc(I);
  2226.         PutPixel(Random(XMax)+1, Random(YMax)+1, RandColor);
  2227.     end;
  2228.  
  2229.     { Erase pixels }
  2230.     RandSeed := Seed;
  2231.     I := 0;
  2232.     while (not KeyPressed) and (I < NumPts) do
  2233.     begin
  2234.       Inc(I);
  2235.       X := Random(XMax)+1;
  2236.       Y := Random(YMax)+1;
  2237.       Color := GetPixel(X, Y);
  2238.         if Color = RandColor then
  2239.           PutPixel(X, Y, 0);
  2240.      end;
  2241.   end;
  2242.   WaitToGo;
  2243. end; { PutPixelPlay }
  2244.  
  2245. procedure PutImagePlay;
  2246. { Demonstrate the GetImage and PutImage commands }
  2247.  
  2248. const
  2249.   r  = 20;
  2250.   StartX = 100;
  2251.   StartY = 50;
  2252.  
  2253. var
  2254.   CurPort : ViewPortType;
  2255.  
  2256. procedure MoveSaucer(var X, Y : integer; Width, Height : integer);
  2257. var
  2258.   Step : integer;
  2259. begin
  2260.   Step := Random(2*r);
  2261.   if Odd(Step) then
  2262.     Step := -Step;
  2263.   X := X + Step;
  2264.   Step := Random(r);
  2265.   if Odd(Step) then
  2266.     Step := -Step;
  2267.   Y := Y + Step;
  2268.  
  2269.   { Make saucer bounce off viewport walls }
  2270.   with CurPort do
  2271.   begin
  2272.     if (x1 + X + Width - 1 > x2) then
  2273.       X := x2-x1 - Width + 1
  2274.     else
  2275.       if (X < 0) then
  2276.         X := 0;
  2277.     if (y1 + Y + Height - 1 > y2) then
  2278.       Y := y2-y1 - Height + 1
  2279.     else
  2280.       if (Y < 0) then
  2281.         Y := 0;
  2282.   end;
  2283. end; { MoveSaucer }
  2284.  
  2285. var
  2286.   Pausetime : word;
  2287.   Saucer    : pointer;
  2288.   X, Y      : integer;
  2289.   ulx, uly  : word;
  2290.   lrx, lry  : word;
  2291.   Size      : word;
  2292.   I         : word;
  2293. begin
  2294.   ClearDevice;
  2295.   FullPort;
  2296.  
  2297.   { PaintScreen }
  2298.   ClearDevice;
  2299.   MainWindow('GetImage / PutImage Demonstration');
  2300.   StatusLine('Esc aborts or press a key...');
  2301.   GetViewSettings(CurPort);
  2302.  
  2303.   { DrawSaucer }
  2304.   Ellipse(StartX, StartY, 0, 360, r, (r div 3)+2);
  2305.   Ellipse(StartX, StartY-4, 190, 357, r, r div 3);
  2306.   Line(StartX+7, StartY-6, StartX+10, StartY-12);
  2307.   Circle(StartX+10, StartY-12, 2);
  2308.   Line(StartX-7, StartY-6, StartX-10, StartY-12);
  2309.   Circle(StartX-10, StartY-12, 2);
  2310.   SetFillStyle(SolidFill, MaxColor);
  2311.   FloodFill(StartX+1, StartY+4, GetColor);
  2312.  
  2313.   { ReadSaucerImage }
  2314.   ulx := StartX-(r+1);
  2315.   uly := StartY-14;
  2316.   lrx := StartX+(r+1);
  2317.   lry := StartY+(r div 3)+3;
  2318.  
  2319.   Size := ImageSize(ulx, uly, lrx, lry);
  2320.   GetMem(Saucer, Size);
  2321.   GetImage(ulx, uly, lrx, lry, Saucer^);
  2322. {  PutImage(ulx, uly, Saucer^, XORput);               { erase image }
  2323.  
  2324.   { Plot some "stars" }
  2325.   for I := 1 to 1000 do
  2326.      PutPixel(Random(MaxX), Random(MaxY), RandColor);
  2327.   X := MaxX div 2;
  2328.   Y := MaxY div 2;
  2329.   PauseTime := 70;
  2330.  
  2331.   { Move the saucer around }
  2332.   repeat
  2333. {     PutImage(X, Y, Saucer^, XORput);                 { draw image }
  2334.      Delay(PauseTime);
  2335. {     PutImage(X, Y, Saucer^, XORput);                 { erase image }
  2336.      MoveSaucer(X, Y, lrx - ulx + 1, lry - uly + 1);  { width/height }
  2337.   until KeyPressed;
  2338.   FreeMem(Saucer, size);
  2339.   WaitToGo;
  2340. end; { PutImagePlay }
  2341.  
  2342. procedure PolyPlay;
  2343. { Draw random polygons with random fill styles on the screen }
  2344. const
  2345.   MaxPts = 5;
  2346. type
  2347.   PolygonType = array[1..MaxPts] of PointType;
  2348. var
  2349.   Poly : PolygonType;
  2350.   I, Color : word;
  2351. begin
  2352.   MainWindow('FillPoly demonstration');
  2353.   StatusLine('Esc aborts or press a key...');
  2354.   repeat
  2355.     Color := RandColor;
  2356.     SetFillStyle(Random(11)+1, Color);
  2357.     SetColor(Color);
  2358.     for I := 1 to MaxPts do
  2359.       with Poly[I] do
  2360.       begin
  2361.         X := Random(MaxX);
  2362.         Y := Random(MaxY);
  2363.       end;
  2364.     FillPoly(MaxPts, Poly);
  2365.   until KeyPressed;
  2366.   WaitToGo;
  2367. end; { PolyPlay }
  2368.  
  2369. procedure FillStylePlay;
  2370. { Display all of the predefined fill styles available }
  2371. var
  2372.   Style    : word;
  2373.   Width    : word;
  2374.   Height   : word;
  2375.   X, Y     : word;
  2376.   I, J     : word;
  2377.   ViewInfo : ViewPortType;
  2378.  
  2379. procedure DrawBox(X, Y : word);
  2380. begin
  2381.   SetFillStyle(Style, MaxColor);
  2382.   with ViewInfo do
  2383.     Bar(X, Y, X+Width, Y+Height);
  2384.   Rectangle(X, Y, X+Width, Y+Height);
  2385.   OutTextXY(X+(Width div 2), Y+Height+4, Int2Str(Style));
  2386.   Inc(Style);
  2387. end; { DrawBox }
  2388.  
  2389. begin
  2390.   MainWindow('Pre-defined fill styles');
  2391.   GetViewSettings(ViewInfo);
  2392.   with ViewInfo do
  2393.   begin
  2394.     Width := 2 * ((x2+1) div 13);
  2395.     Height := 2 * ((y2-10) div 10);
  2396.   end;
  2397.   X := Width div 2;
  2398.   Y := Height div 2;
  2399.   Style := 0;
  2400.   for J := 1 to 3 do
  2401.   begin
  2402.     for I := 1 to 4 do
  2403.     begin
  2404.       DrawBox(X, Y);
  2405.       Inc(X, (Width div 2) * 3);
  2406.     end;
  2407.     X := Width div 2;
  2408.     Inc(Y, (Height div 2) * 3);
  2409.   end;
  2410.   SetTextJustify(LeftText, TopText);
  2411.   WaitToGo;
  2412. end; { FillStylePlay }
  2413.  
  2414. procedure FillPatternPlay;
  2415. { Display some user defined fill patterns }
  2416. const
  2417.   Patterns : array[0..11] of FillPatternType = (
  2418.   ($AA, $55, $AA, $55, $AA, $55, $AA, $55 üÖü üÖü  !BBäx!!!BBäx!BBäx"""DDêp""DDêp>"""BBääêp""!"BDäêêp>IÉÆ|      ° @≥î>00>><Dêx  !BBäx""DDêp&<"DDêê&22TTêêê$> $< @äêp>          ⁿBBBB<  @@Ç****DDDDDDDU¬U¬U¬U¬U¬U¬U¬▌w▌w▌w▌w▌w▌w▌w°°°≥■°°≥≥■≥≥■■°°°    ≤  ≤  ≤≤         °                     ≡≡≡≡≡≡≡≡≡≡≡≡≡≡       ;DDD;    $"Bdÿ>@@@>||>Ac]AAA1N"A""2,  `1NA"*III*<Bü üB<<BüüüB<A" \"QIE" < <BBBB  @@    ~ ?  @ÇB$$B ""A$$"AII6 üBr»$**IIII**ccregion.  The region is defined as any pixel of
  2419.             OldColor which has a path of pixels of OldColor or NewColor
  2420.             with sides touching back to the seed point, (XSeed, YSeed).
  2421.             Therefore, only pixels of OldColor are modified and no other
  2422.             information is changed.
  2423.  
  2424.             SEE ALSO
  2425.  
  2426.             DRWFILLBOX, DRWFILLCIRCLE, DRWFILLELLIPSE, FILLAREA,
  2427.             FILLCONVEXPOLY, FILLPAGE, FILLPOLY, FILLSCREEN, FILLVIEW,
  2428.             SETVIEW
  2429.  
  2430.             EXAMPL(HNxHHO$B<BBBB<$<BBBB<<BBBB<$BBBBBF:0BBBBF:$BBBF:B<""AAA""AAAAA"<B@@B<" <2\A">>xDDxDNDD <` <>BB= > <BBBB< BBBBF:2L\bBBBB&AaQIECA8$>""">0@@A>@@@ b$(. b$(*
  2431.     $    $    $DDDDDDD¬U¬U¬U¬U¬U¬U¬Uw▌w▌w▌w▌w▌w▌w▌°°°⌠ⁿ°°⌠⌠ⁿ⌠⌠ⁿⁿ°°°    ≈  ≈  ≈≈         °                     ≡≡≡≡≡≡≡≡≡≡≡≡≡≡       7HH7"B\DBBRL~BB@@@@@@?R~!!~?DDDD8BBBB|@@Ç>P>III>"AA""AAA"Uw<DDDD86II6"EIQ"\ @@ "AAAAA> >     hH02L2L$$<H(,$<>>>>>>>         VMODE=VIDEOMODEGET
  2432.             IF WHICHVGA = 0 THEN STOP
  2433.             DUMMY=RES640
  2434.             SETVIEW 100, 100, 539, 379
  2435.             FILLVIEW 10
  2436.             WHILE INKEY$ = ""
  2437.             WEND
  2438.             VIDEOMODESET VMODE
  2439.             END
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.  
  2450.  
  2451.  
  2452.  
  2453.  
  2454.  
  2455.  
  2456.                                                                          63
  2457.  
  2458.  
  2459.  
  2460.  
  2461.  
  2462.  
  2463.           FONTGETINFO
  2464.  
  2465.             PROTOTYPE
  2466.  
  2467.             SUB FONTGETINFO (Width%, Height%)
  2468.  
  2469.             INPUT
  2470.  
  2471.             no input parameters
  2472.     WEND
  2473.             MOUSEEXIT
  2474.             VIDEOMODESET VMODE
  2475.             END
  2476.  
  2477.  
  2478.  
  2479.  
  2480.  
  2481.  
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.  
  2516.                                                                          86
  2517.  
  2518.  
  2519.  
  2520.  
  2521.  
  2522.  
  2523.           MOUSECURSORDEFAULT
  2524.  
  2525.             PROTOTYPE
  2526.  
  2527.             SUB MOUSECURSORDEFAULT ()
  2528.  
  2529.             INPUT
  2530.  
  2531.             no input parameters
  2532.  
  2533.             OUTPUT
  2534.  
  2535.             no value returned
  2536.  
  2537.             USAGE
  2538.  
  2539.             MOUSECURSORDEFAULT defines the mouse cursor to be a small
  2540.        ,K$╖┼╘╤░XQ)σ┤ö≡÷┴─┤àñT┘,╘¬àñX9╘⌠àñ\9╘UÜ╢≤`9╘4a╘d9╘UTa╘h9╘ta╘l9╘Uöa╘p9╘┤a╘t┘PT±x┴îÇ╖0▓ïα│ÅαU┤ôα╡ùα╢¢α╖úΓ╘pǺΓ╕¡αë ╚┴πì°sKÉφb<$⌡▌ë     φë φë I1φë  Eφë $YφÆë (mφë ,üφë 0$òφë á⌐φë ñ╜φë I¿╤φë ¼σφë ░∙φÆë 4
  2541. ²ë ┤!²ë ╕$5²ë ╝I²ë └]²ë ⌐8q²ë <àⁿΦiǬ∙PÖÇ ¥Ç
  2542. ░╨â@%8@ΓΦá╝╤░≡cÑÅ*$
  2543. ░╕≡ż≡τ╥m¿⌡ε    ╨@#µ≈$âh$âαra╨à`¥è∩Ç%Ç +─▀ TîcOî∩â°1<@  [$¿Ç¼ MMl·0ƒ Y¼─!%6a▐è ¥ì ßá+?±  P<îaTTV ╪iÇ¡≥░ `_ñ»%Çá᪠P█º»ε`éa∙É%H«┴íA%Gár∙É
  2544. iw∙Éiφ`╧≥≡╤Çmⁿ▒
  2545. ]ÆAáσw7░⌡∩    $·╟Ç√É&^`  ┐ $ⁿ  $■ $╒ nk$J-ÉQ1£PéBù »0αQ/Ñ4╜£░ºP≈Ñ4Ç⌡$(ª▀$@C]Æé≈└╕_SÇçÑ4=iÉ⌠ä╣<_np@Ñ45ò▒Y3ü¼Qí░.i>╠@5+┴╙É╛╙$@ #┴@«╦
  2546. $╤
  2547. #@Ñú4,p&e÷ü¼_ÇQºÑ4
  2548. òQ  ü@;¡_áQ@e╠≥@mp!┤a╘O░√`Pñź ÇT°8ÿ!¼Åñ$½╙"q¿ PñCÇ¿α√└╥░eT"ß<p°%Pæ(╧%pδ¥/OêW0Ǽbφ φ B@[â¼8â≥µ≤(    ¿⌡%(Ç∩áTÿp+ óÜ▓0!Σ±(1±
  2549. ░┤ÖÇD└D0Å╡`   $ «îO@╧1
  2550. a╝╤j-0ñ│`@╖bΦaT1═⌠╝╤Σ²¼±,1öíî9lÿ28ÇÅ`Γî¿P²$,N0┴O0a╫δ≤0σú`°î╖#0δ≡└X▄1»Σî(▒¥Ç█Ñ"qá√1CÇú╟╨º Å
  2551. FT Θ²î└1ÇY0    w ²à░$@AÅ`╦Φ¼╘`▄1A  }┐Ç*5 ΩSδδî`¼îaδæ¼î5 1¿⌡Ω╜⌠ ¼¥╬ü└Qî1S
  2552. ╛≤î9╨iÇ,∙PU(}Ç$üÇ àÇ`σìÇ`QαÜBO$%ÿÇ╧"$Ç«Ç]É.┬\`%WÉ$  W0 ÄâO0]αG┬ur╩
  2553. ░£▒
  2554. Q¢ú╔Ç≡°s?`X0╘`@ µWâ@╣aá εdq`¥9?Ç&+o0µyÄΣAÅuV(7P╬±@IdQ╕@Å┤@;Ç▓?Çò│CÇ┤╟╨╡KÇÄ30ⁿφ° ó╬ì+]Ä╦≡     Mö╝σ ²y5<!└▀óâ╝É3~mp    $<╛≤9Æ-2ⁿ≡@T,╞Σa,)Pæ└¥#¼╪Q┤S(¼@Aîa
  2555. ≡╤@Ö²±⌠KëD─┴▒▀0╨Ñ$╩-0 ╨ê*╙▓edm`î=3Kß-10è=≥≤²└£mîjy ÿe²ⁿ╨i╕e▓ΣmαÖ╢C%Ç*ê*0 EátQZ`mÄLP%    °üⁿªüNQ∙  T¿<qtWΩc z░ÅÇñΩçǪçÇ«;└<┐á¼¥. á?<Σscî)áí := 0;
  2556.       end;
  2557.     end;
  2558.   end;
  2559.   WaitToGo;
  2560. end; { UserLineStylePlay }
  2561.  
  2562.  
  2563. procedure SayGoodbye;
  2564. { Say goodbye and then exit the program }
  2565. var
  2566.   ViewInfo : ViewPortType;
  2567. begin
  2568.   MainWindow('');
  2569.   GetViewSettings(ViewInfo);
  2570.   SetTextStyle(TriplexFont, HorizDir, 4);
  2571.   SetTextJustify(CenterText, CenterText);
  2572.   with ViewInfo do
  2573.     OutTextXY((x2-x1) div 2, (y2-y1) div 2, 'That''s all folks!');
  2574.   StatusLine('Press any key to quit...');
  2575.   repeat until KeyPressed;
  2576. end; { SayGoodbye }
  2577.  
  2578.  
  2579. PROCEDURE SelectMode;
  2580. VAR
  2581.     choice1,choice2     : CHAR;
  2582.    xsize,ysize            : WORD;
  2583. BEGIN
  2584.     (* Let's select a mode *)
  2585.     ClrScr;
  2586.     WriteLn('VESADEMO:');
  2587.     WriteLn('1. 256 colors');
  2588.     WriteLn('2. 32768 colors');
  2589.     WriteLn('3. 65536 colors');
  2590.     WriteLn('4. 16777216 colors');
  2591.     WriteLn('Q uit');
  2592.     WriteLn;
  2593.     Write('Your choice: ');
  2594.     REPEAT
  2595.         ReadLn(choice1);
  2596.       IF choice1 <> '1' THEN BEGIN
  2597.           WriteLn('Sorry !');
  2598.          WriteLn('This demo wasn''t written for more as 256 colors !');
  2599.          WriteLn('You would only get a limited impression of the Hi-& TrueColor modes...');
  2600.          WriteLn('Switching to 256 colors.');
  2601.          choice1 := '1';
  2602.       END;
  2603.     UNTIL choice1 IN ['1'..'4','q'];
  2604.     IF choice1 = 'q' THEN Halt;
  2605.  
  2606.     WriteLn;
  2607.     WriteLn;
  2608.